Skip to content

Commit 2ac2ae0

Browse files
committed
Add Test
1 parent 7d94f67 commit 2ac2ae0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

liquidjava-example/src/main/java/testSuite/CorrectChars.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import liquidjava.specification.Refinement;
44

5+
@SuppressWarnings("unused")
56
public class CorrectChars {
67

78
@Refinement("_ == 65")
@@ -19,4 +20,17 @@ void test() {
1920
void printLetter(@Refinement("_ >= 65 && _ <= 90 || _ >= 97 && _ <= 122") char c) {
2021
System.out.println(c);
2122
}
23+
24+
void test2() {
25+
@Refinement("_ == 97")
26+
char c = 'a';
27+
28+
@Refinement("_ == 98")
29+
int res = inc(c);
30+
}
31+
32+
@Refinement("_ == x + 1")
33+
int inc(int x) {
34+
return x + 1;
35+
}
2236
}

0 commit comments

Comments
 (0)