< prev index next >

test/langtools/lib/combo/tools/javac/combo/CompilationTestCase.java

Print this page

 95         postTest.run();
 96         return dir;
 97     }
 98 
 99     protected void assertOK(String... constructs) {
100         assertCompile(expandMarkers(constructs), this::assertCompileSucceeded, false);
101     }
102 
103     protected File assertOK(boolean generate, String... constructs) {
104         return assertCompile(expandMarkers(constructs), this::assertCompileSucceeded, generate);
105     }
106 
107     protected File assertOK(Consumer<Diagnostic<?>> diagConsumer, String... constructs) {
108         return assertCompile(expandMarkers(constructs), () -> assertCompileSucceeded(diagConsumer), false);
109     }
110 
111     protected void assertOKWithWarning(String warning, String... constructs) {
112         assertCompile(expandMarkers(constructs), () -> assertCompileSucceededWithWarning(warning), false);
113     }
114 




115     protected void assertFail(String expectedDiag, String... constructs) {
116         assertCompile(expandMarkers(constructs), () -> assertCompileFailed(expectedDiag), false);
117     }
118 
119     protected void assertFail(String expectedDiag, Consumer<Diagnostic<?>> diagConsumer, String... constructs) {
120         assertCompile(expandMarkers(constructs), () -> assertCompileFailed(expectedDiag, diagConsumer), false);
121     }
122 }

 95         postTest.run();
 96         return dir;
 97     }
 98 
 99     protected void assertOK(String... constructs) {
100         assertCompile(expandMarkers(constructs), this::assertCompileSucceeded, false);
101     }
102 
103     protected File assertOK(boolean generate, String... constructs) {
104         return assertCompile(expandMarkers(constructs), this::assertCompileSucceeded, generate);
105     }
106 
107     protected File assertOK(Consumer<Diagnostic<?>> diagConsumer, String... constructs) {
108         return assertCompile(expandMarkers(constructs), () -> assertCompileSucceeded(diagConsumer), false);
109     }
110 
111     protected void assertOKWithWarning(String warning, String... constructs) {
112         assertCompile(expandMarkers(constructs), () -> assertCompileSucceededWithWarning(warning), false);
113     }
114 
115     protected void assertOKWithWarning(String warning, int numberOfTimes, String... constructs) {
116         assertCompile(expandMarkers(constructs), () -> assertCompileSucceededWithWarning(warning, numberOfTimes), false);
117     }
118 
119     protected void assertFail(String expectedDiag, String... constructs) {
120         assertCompile(expandMarkers(constructs), () -> assertCompileFailed(expectedDiag), false);
121     }
122 
123     protected void assertFail(String expectedDiag, Consumer<Diagnostic<?>> diagConsumer, String... constructs) {
124         assertCompile(expandMarkers(constructs), () -> assertCompileFailed(expectedDiag, diagConsumer), false);
125     }
126 }
< prev index next >