Skip to content

Commit 1e11f6d

Browse files
antlechnersmowton
authored andcommitted
Add test for multiple array types in single method
1 parent 5009cbb commit 1e11f6d

File tree

7 files changed

+39
-0
lines changed

7 files changed

+39
-0
lines changed
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class A {
2+
3+
public int f() {
4+
return 1;
5+
}
6+
7+
}
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class B {
2+
3+
public int g() {
4+
return 5;
5+
}
6+
7+
}
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class Test {
2+
3+
A[] arrayA;
4+
B[] arrayB;
5+
6+
public static void check(Test t) {
7+
if (t == null || t.arrayA == null || t.arrayB == null ||
8+
t.arrayA.length == 0 || t.arrayB.length == 0 ||
9+
t.arrayA[0] == null || t.arrayB[0] == null)
10+
return;
11+
int i = t.arrayA[0].f();
12+
int j = t.arrayB[0].g();
13+
int sum = i + j;
14+
assert(sum == 6);
15+
}
16+
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Test.class
3+
--lazy-methods --verbosity 10 --function Test.check
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
elaborate java::A\.f:\(\)I
7+
elaborate java::B\.g:\(\)I
8+
VERIFICATION SUCCESSFUL

0 commit comments

Comments
 (0)