Skip to content

Commit a870306

Browse files
committed
Minor Changes
1 parent 6df142a commit a870306

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

liquidjava-verifier/src/test/java/liquidjava/api/tests/TestExamples.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public void testPath(final Path path) {
3939

4040
// verification should pass, check if any errors were found
4141
if (shouldPass(pathName) && diagnostics.foundError()) {
42-
System.out.println("Error in: " + pathName + " --- should be correct but an error was found");
42+
System.out.println("Error in: " + pathName + " --- should pass but an error was found");
4343
fail();
4444
}
4545
// verification should fail, check if it failed as expected (we assume each error test has exactly one error)
4646
else if (shouldFail(pathName)) {
4747
if (!diagnostics.foundError()) {
48-
System.out.println("Error in: " + pathName + " --- should be an error but passed verification");
48+
System.out.println("Error in: " + pathName + " --- should fail but no errors were found");
4949
fail();
5050
} else {
5151
// check if expected error was found

liquidjava-verifier/src/test/java/liquidjava/utils/TestUtils.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@
88

99
public class TestUtils {
1010

11+
/**
12+
* Determines if the given path indicates that the test should pass
13+
* @param path
14+
*/
1115
public static boolean shouldPass(String path) {
1216
return path.toLowerCase().contains("correct") || path.toLowerCase().contains("warning");
1317
}
1418

19+
/**
20+
* Determines if the given path indicates that the test should fail
21+
* @param path
22+
*/
1523
public static boolean shouldFail(String path) {
1624
return path.toLowerCase().contains("error");
1725
}

0 commit comments

Comments
 (0)