use of com.intellij.testFramework.CompilerTester in project intellij-community by JetBrains.
the class MavenCompilingTestCase method compile.
private void compile(final CompileScope scope) {
try {
CompilerTester tester = new CompilerTester(myProject, Arrays.asList(scope.getAffectedModules()));
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
@Override
public void run() {
new MavenResourceCompilerConfigurationGenerator(myProject, MavenProjectsManager.getInstance(myProject).getProjectsTreeForTests()).generateBuildConfiguration(false);
}
});
try {
List<CompilerMessage> messages = tester.make(scope);
for (CompilerMessage message : messages) {
if (message.getCategory() == CompilerMessageCategory.ERROR) {
fail("Compilation failed with error: " + message.getMessage());
}
}
} finally {
tester.tearDown();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of com.intellij.testFramework.CompilerTester in project intellij-community by JetBrains.
the class CompilerReferencesFindUsagesTest method setUp.
@Override
public void setUp() throws Exception {
myDefaultEnableState = CompilerReferenceService.IS_ENABLED_KEY.asBoolean();
CompilerReferenceService.IS_ENABLED_KEY.setValue(true);
super.setUp();
myCompilerTester = new CompilerTester(myModule);
LanguageLevelProjectExtension.getInstance(myProject).setLanguageLevel(LanguageLevel.JDK_1_8);
}
Aggregations