Skip to content

Commit

Permalink
new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
wadoon committed May 3, 2024
1 parent f2ef7f2 commit c918bf0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@ void test2() throws IOException {
var clause = cu.getType(0).getMethods().get(0).getContracts().get(0).getClauses().get(0).asJmlSimpleExprClause();
Assertions.assertEquals(1, clause.getChildNodes().size());
}

@Test
void test3() throws IOException {
ParserConfiguration cfg = new ParserConfiguration();
cfg.setProcessJml(true);
JavaParser parser = new JavaParser(cfg);
final var result = parser.parse(Paths.get("src/test/test_sourcecode/JKTmpTest.java"));
result.getProblems().forEach(System.err::println);
Assertions.assertTrue(result.isSuccessful());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class JKTmpTest {
int[] arr;

void f() {
for (int i : arr) {
}
}
}

0 comments on commit c918bf0

Please sign in to comment.