File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
liquidjava-verifier/src/test/java/liquidjava Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 88
99public 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 }
You can’t perform that action at this time.
0 commit comments