Skip to content

Commit

Permalink
Test for abstract class with two generic arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbrenguier committed Apr 27, 2018
1 parent e936a29 commit c06c7e4
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 0 deletions.
Binary file added regression/jbmc-cover/generics/AbstractImpl.class
Binary file not shown.
Binary file added regression/jbmc-cover/generics/AbstractInt.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added regression/jbmc-cover/generics/AbstractTest.class
Binary file not shown.
23 changes: 23 additions & 0 deletions regression/jbmc-cover/generics/AbstractTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
interface AbstractInt<K,V> { V get(); }

class AbstractImpl<K,V> implements AbstractInt<K,V> {
V t;
public V get() { return t; }
}

public class AbstractTest
{
class Dummy { private boolean b; }
class ClassA { private int id; }
class ClassB {
private int id;
int getId() { return id; }
}

public int getFromAbstract(AbstractInt<ClassA, ClassB> arg) {
AbstractImpl<Dummy, Dummy> dummy = new AbstractImpl<>();
ClassB b = arg.get();
int i = b.getId();
return i;
}
}
11 changes: 11 additions & 0 deletions regression/jbmc-cover/generics/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CORE
AbstractTest.class
--cover location --function AbstractTest.getFromAbstract
^EXIT=0$
^SIGNAL=0$
file AbstractTest.java line 18 .* SATISFIED
file AbstractTest.java line 19 .* SATISFIED
file AbstractTest.java line 20 .* SATISFIED
file AbstractTest.java line 21 .* SATISFIED


0 comments on commit c06c7e4

Please sign in to comment.