Skip to content

Commit

Permalink
Fix for NameEnvironmentAnswerListenerTest failure on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveeclipse committed Jun 18, 2024
1 parent 47110ad commit ec43909
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ public void testNameEnvironmentAnswerListener() throws IOException {
Assert.fail("Compile failed, output: '" + logOutputString + "'");
}
}
Assert.assertTrue("must reference p.Color", compiler.answeredFileNames.stream().anyMatch(s -> s.contains(libPath)));
Assert.assertFalse("must not reference p2.Color", compiler.answeredFileNames.stream().anyMatch(s -> s.contains(unusedLibPath)));
String libPathExpected = libPath.replace('\\', '/');
String unusedLibPathExpected = unusedLibPath.replace('\\', '/');
Set<String> answeredFileNames = compiler.answeredFileNames;
Assert.assertTrue("must reference p.Color: " + answeredFileNames, answeredFileNames.stream().anyMatch(s -> s.contains(libPathExpected)));
Assert.assertFalse("must not reference p2.Color: " + answeredFileNames, answeredFileNames.stream().anyMatch(s -> s.contains(unusedLibPathExpected)));
}
}

0 comments on commit ec43909

Please sign in to comment.