use of org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension in project kotlin by JetBrains.
the class AbstractBlackBoxCodegenTest method doLightAnalysisModeTest.
private void doLightAnalysisModeTest(@NotNull File wholeFile, @NotNull List<TestFile> files, @Nullable File javaFilesDir) {
if (SKIP_LIGHT_ANALYSIS_MODE_TESTS)
return;
File boxTestsDir = new File("compiler/testData/codegen/box");
String relativePath = FilesKt.toRelativeString(wholeFile, boxTestsDir);
// Do nothing if this test is not under codegen/box
if (relativePath.startsWith(".."))
return;
String outDir = new File("compiler/testData/codegen/light-analysis", relativePath).getParent();
File txtFile = new File(outDir, FilesKt.getNameWithoutExtension(wholeFile) + ".txt");
AbstractBytecodeListingTest.doTest(getTestRootDisposable(), files, javaFilesDir, txtFile, ClassBuilderFactories.TEST_KAPT3, new Function1<KotlinCoreEnvironment, Unit>() {
@Override
public Unit invoke(KotlinCoreEnvironment environment) {
AnalysisHandlerExtension.Companion.registerExtension(environment.getProject(), new PartialAnalysisHandlerExtension());
return Unit.INSTANCE;
}
});
}
Aggregations