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:
Alexander Udalov
2016-05-19 17:43:09 +03:00
parent 8a00cabce6
commit 0124cb64f0
28 changed files with 147 additions and 245 deletions
@@ -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 {