-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for abstract class with two generic arguments
- Loading branch information
1 parent
e936a29
commit c06c7e4
Showing
8 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|