Java: Add test.

This commit is contained in:
Anders Schack-Mulligen
2018-11-09 13:30:36 +01:00
parent 6f791bb530
commit 46bebc898a
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
public class C {
private Elem s1 = new Elem();
private final Elem s2 = new Elem();
private Elem s3;
private static Elem s4 = new Elem();
public static void main(String[] args){
C c = new C();
c.func();
}
private C() {
this.s3 = new Elem();
}
public void func(){
sink(s1);
sink(s2);
sink(s3);
sink(s4);
}
public static void sink(Object o) { }
public static class Elem { }
}

View File

@@ -15,3 +15,7 @@
| B.java:4:14:4:23 | new Elem(...) | B.java:8:10:8:22 | b2.box1.elem2 |
| B.java:12:14:12:23 | new Elem(...) | B.java:15:10:15:22 | b2.box1.elem1 |
| B.java:12:14:12:23 | new Elem(...) | B.java:16:10:16:22 | b2.box1.elem2 |
| C.java:3:21:3:30 | new Elem(...) | C.java:18:10:18:11 | s1 |
| C.java:4:27:4:36 | new Elem(...) | C.java:19:10:19:11 | s2 |
| C.java:6:28:6:37 | new Elem(...) | C.java:21:10:21:11 | s4 |
| C.java:14:15:14:24 | new Elem(...) | C.java:20:10:20:11 | s3 |