Skip to content

Commit 0db7ffa

Browse files
committed
Add regression test for TG-2479
1 parent 719e9a9 commit 0db7ffa

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed
180 Bytes
Binary file not shown.
1.27 KB
Binary file not shown.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
public class LambdaBasic {
2+
3+
private boolean endOnSuccess = true;
4+
5+
public void testThis() {
6+
boolean endOnSuccess;
7+
endOnSuccess = this.endOnSuccess;
8+
If boo = () -> {
9+
if (endOnSuccess) {
10+
assert endOnSuccess; // verification success
11+
return 1;
12+
}
13+
assert endOnSuccess; // verification failure
14+
return 0;
15+
};
16+
17+
int x0 = boo.xInt();
18+
if (x0 == 1) {
19+
assert x0 == 0; // verification failure
20+
} else {
21+
assert x0 >= -1 || x0 < -1; // verification success
22+
}
23+
}
24+
25+
interface If {
26+
27+
int xInt();
28+
}
29+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CORE
2+
LambdaBasic.class
3+
--function LambdaBasic.testThis --property 'java::LambdaBasic.lambda$testThis$0:(Z)I.assertion.1' --property 'java::LambdaBasic.lambda$testThis$0:(Z)I.assertion.2' --property 'java::LambdaBasic.testThis:()V.assertion.1' --property 'java::LambdaBasic.testThis:()V.assertion.2'
4+
line 10 assertion.*SUCCESS$
5+
line 13 assertion.*FAILURE$
6+
line 19 assertion.*FAILURE$
7+
line 21 assertion.*SUCCESS$
8+
^EXIT=10$
9+
^SIGNAL=0$
10+
--
11+
--
12+
This test is a minimised example reported in TG-2479 and fixed during lambda
13+
development.

0 commit comments

Comments
 (0)