@@ -35,37 +35,43 @@ public void testPath(final Path path) {
3535 boolean isDirectory = Files .isDirectory (path );
3636
3737 // run verification
38- CommandLineLauncher .launch (path .toAbsolutePath ().toString ());
38+ CommandLineLauncher .launch (path .toFile ().toString ());
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 pass but an error was found" );
42+ System .out .println ("Error in: " + pathName + " --- should pass but an error was found. \n "
43+ + diagnostics .getErrorOutput ());
4344 fail ();
4445 }
4546 // verification should fail, check if it failed as expected (we assume each error test has exactly one error)
4647 else if (shouldFail (pathName )) {
4748 if (!diagnostics .foundError ()) {
48- System .out .println ("Error in: " + pathName + " --- should fail but no errors were found" );
49+ System .out .println ("Error in: " + pathName + " --- should fail but no errors were found. \n "
50+ + diagnostics .getErrorOutput ());
4951 fail ();
5052 } else {
5153 // check if expected error was found
5254 Optional <String > expected = isDirectory ? getExpectedErrorFromDirectory (path )
5355 : getExpectedErrorFromFile (path );
5456 if (diagnostics .getErrors ().size () > 1 ) {
55- System .out .println ("Multiple errors found in: " + pathName + " --- expected exactly one error" );
57+ System .out .println ("Multiple errors found in: " + pathName + " --- expected exactly one error. \n "
58+ + diagnostics .getErrorOutput ());
59+ System .out .println (diagnostics .getErrorOutput ());
5660 fail ();
5761 }
5862 LJError error = diagnostics .getErrors ().iterator ().next ();
5963 if (error .getPosition () == null ) {
60- System .out .println ("Error in: " + pathName + " --- error has no position information" );
64+ System .out .println ("Error in: " + pathName + " --- error has no position information. \n "
65+ + diagnostics .getErrorOutput ());
66+ System .out .println (diagnostics .getErrorOutput ());
6167 fail ();
6268 }
6369 if (expected .isPresent ()) {
6470 String expectedError = expected .get ();
6571 String foundError = error .getTitle ();
6672 if (!foundError .equalsIgnoreCase (expectedError )) {
6773 System .out .println ("Error in: " + pathName + " --- expected error: " + expectedError
68- + ", but found: " + foundError );
74+ + ", but found: " + foundError + ". \n " + diagnostics . getErrorOutput () );
6975 fail ();
7076 }
7177 } else {
@@ -115,7 +121,7 @@ public void testMultiplePaths() {
115121 CommandLineLauncher .launch (paths );
116122 // Check if any of the paths that should be correct found an error
117123 if (diagnostics .foundError ()) {
118- System .out .println ("Error found in files that should be correct" );
124+ System .out .println ("Error found in files that should be correct. \n " + diagnostics . getErrorOutput () );
119125 fail ();
120126 }
121127 }
0 commit comments