Cleanup test utilities in JvmResolveUtil and GenerationUtils
Simplify usages and fix some warnings along the way. Rename: - analyzeFilesWithJavaIntegration, analyzeOneFileWithJavaIntegration -> analyze - analyzeFilesWithJavaIntegrationAndCheckForErrors, analyzeOneFileWithJavaIntegrationAndCheckForErrors -> analyzeAndCheckForErrors - compileFilesGetGenerationState, compileManyFilesGetGenerationStateForTest -> compileFiles - compileFileGetGenerationStateForTest -> compileFile - compileFileGetClassFileFactoryForTest -> compileFileTo
This commit is contained in:
@@ -25,7 +25,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.cli.common.output.outputUtils.OutputUtilsKt;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider;
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt;
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration;
|
||||
@@ -97,10 +96,7 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
|
||||
|
||||
loadMultiFiles(files);
|
||||
|
||||
classFileFactory = GenerationUtils.compileManyFilesGetGenerationStateForTest(
|
||||
myEnvironment.getProject(), myFiles.getPsiFiles(), new JvmPackagePartProvider(myEnvironment),
|
||||
myEnvironment.getConfiguration()
|
||||
).getFactory();
|
||||
classFileFactory = GenerationUtils.compileFiles(myFiles.getPsiFiles(), myEnvironment).getFactory();
|
||||
|
||||
if (javaSourceDir != null) {
|
||||
// If there are Java files, they should be compiled against the class files produced by Kotlin, so we dump them to the disk
|
||||
|
||||
Reference in New Issue
Block a user