[tests] fix tests on java6/7

This commit is contained in:
Reinier Zwitserloot committed 2021-03-05 08:06:46 +01:00
1 parent eebc5f4e85
commit f8c16ed8ac
41 files changed
+47 -5

No files matched your search

@@ -76,7 +76,7 @@ public class TestClassFileMetaData {
}
@Test
public void testUsesClass() {
assertTrue(foo.usesClass("java/lang/System"));
@@ -199,7 +199,7 @@ public class TestClassFileMetaData {
CompilationTask task = compiler.getTask(captureWarnings, null, diagnostics, options, null, Collections.singleton(new ContentBasedJavaFileObject(file.getPath(), readFileAsString(file))));
Boolean taskResult = task.call();
assertTrue("Compilation task didn't succeed: \n<Warnings and Errors>\n" + compilerErrors.toString() + "\n</Warnings and Errors>", taskResult);
assertTrue("Compilation task didn't succeed: \n<Warnings and Errors>\n" + compilerErrors.toString() + "\n" + captureWarnings.toString() + "\n</Warnings and Errors>", taskResult);
return PostCompilerApp.readFile(new File(tempDir, file.getName().replaceAll("\\.java$", ".class")));
} catch (Exception e) {
throw Lombok.sneakyThrow(e);