Skip to content

Commit b7c9ea1

Browse files
Test for abstract class with two generic arguments
1 parent c141611 commit b7c9ea1

8 files changed

+33
-0
lines changed
466 Bytes
Binary file not shown.
240 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
645 Bytes
Binary file not shown.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
interface AbstractInt<K,V> { V get(); }
2+
3+
class AbstractImpl<K,V> implements AbstractInt<K,V> {
4+
V t;
5+
public V get() { return t; }
6+
}
7+
8+
public class AbstractTest {
9+
class Dummy { private boolean b; }
10+
class ClassA { private int id; }
11+
class ClassB {
12+
private int id;
13+
int getId() { return id; }
14+
}
15+
16+
public int getFromAbstract(AbstractInt<ClassA, ClassB> arg) {
17+
AbstractImpl<Dummy, Dummy> dummy = new AbstractImpl<>();
18+
ClassB b = arg.get();
19+
int i = b.getId();
20+
return i;
21+
}
22+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
AbstractTest.class
3+
--cover location --function AbstractTest.getFromAbstract
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
file AbstractTest.java line 18 .* SATISFIED
7+
file AbstractTest.java line 19 .* SATISFIED
8+
file AbstractTest.java line 20 .* SATISFIED
9+
file AbstractTest.java line 21 .* SATISFIED
10+
11+

0 commit comments

Comments
 (0)