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:
@@ -129,13 +129,14 @@ public abstract class AbstractPositionManagerTest extends KotlinLightCodeInsight
|
||||
private void performTest() {
|
||||
Project project = getProject();
|
||||
List<KtFile> files = new ArrayList<KtFile>(PluginJetFilesProvider.allFilesInProject(project));
|
||||
if (files.isEmpty()) return;
|
||||
|
||||
final List<Breakpoint> breakpoints = Lists.newArrayList();
|
||||
for (KtFile file : files) {
|
||||
breakpoints.addAll(extractBreakpointsInfo(file, file.getText()));
|
||||
}
|
||||
|
||||
GenerationState state = GenerationUtils.compileManyFilesGetGenerationStateForTest(project, files);
|
||||
GenerationState state = GenerationUtils.compileFiles(files, null);
|
||||
|
||||
Map<String, ReferenceType> referencesByName = getReferenceMap(state.getFactory());
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public abstract class AbstractDiagnosticMessageTest extends KotlinTestWithEnviro
|
||||
|
||||
@NotNull
|
||||
protected AnalysisResult analyze(@NotNull KtFile file) {
|
||||
return JvmResolveUtil.analyzeOneFileWithJavaIntegration(file);
|
||||
return JvmResolveUtil.analyze(file, getEnvironment());
|
||||
}
|
||||
|
||||
public void doTest(String filePath) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user