remove Jet from names of classes in tests: phase 2

This commit is contained in:
Dmitry Jemerov
2015-11-03 14:05:20 +01:00
parent c604f98a1c
commit 19af88738b
382 changed files with 21630 additions and 21661 deletions
@@ -48,7 +48,7 @@ public abstract class KotlinLiteFixture extends KotlinTestWithEnvironment {
}
protected String getTestDataPath() {
return JetTestUtils.getTestDataPathBase();
return KotlinTestUtils.getTestDataPathBase();
}
@Override
@@ -63,7 +63,7 @@ public abstract class KotlinLiteFixture extends KotlinTestWithEnvironment {
}
protected String loadFile(@NonNls @TestDataFile String name) throws IOException {
return JetTestUtils.doLoadFile(myFullDataPath, name);
return KotlinTestUtils.doLoadFile(myFullDataPath, name);
}
protected KtFile createPsiFile(@Nullable String testName, @Nullable String fileName, String text) {
@@ -71,7 +71,7 @@ public abstract class KotlinLiteFixture extends KotlinTestWithEnvironment {
Assert.assertNotNull(testName);
fileName = testName + ".kt";
}
return JetTestUtils.createFile(fileName, text, getProject());
return KotlinTestUtils.createFile(fileName, text, getProject());
}
protected KtFile loadPsiFile(String name) {
@@ -32,6 +32,6 @@ public abstract class KotlinTestWithEnvironmentManagement extends UsefulTestCase
@NotNull
protected KotlinCoreEnvironment createEnvironmentWithJdk(@NotNull ConfigurationKind configurationKind, @NotNull TestJdkKind jdkKind) {
return JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(getTestRootDisposable(), configurationKind, jdkKind);
return KotlinTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(getTestRootDisposable(), configurationKind, jdkKind);
}
}
@@ -71,7 +71,7 @@ public class MockLibraryUtil {
@NotNull String... extraClasspath
) {
try {
File contentDir = JetTestUtils.tmpDir("testLibrary-" + jarName);
File contentDir = KotlinTestUtils.tmpDir("testLibrary-" + jarName);
File classesDir = new File(contentDir, "classes");
@@ -85,7 +85,7 @@ public class MockLibraryUtil {
if (!javaFiles.isEmpty()) {
List<String> classpath = new ArrayList<String>();
classpath.add(ForTestCompileRuntime.runtimeJarForTests().getPath());
classpath.add(JetTestUtils.getAnnotationsJar().getPath());
classpath.add(KotlinTestUtils.getAnnotationsJar().getPath());
Collections.addAll(classpath, extraClasspath);
// Probably no kotlin files were present, so dir might not have been created after kotlin compiler
@@ -101,7 +101,7 @@ public class MockLibraryUtil {
"-d", classesDir.getPath()
);
JetTestUtils.compileJavaFiles(javaFiles, options);
KotlinTestUtils.compileJavaFiles(javaFiles, options);
}
return createJarFile(contentDir, classesDir, sourcesPath, jarName, addSources);
@@ -118,7 +118,7 @@ public class MockLibraryUtil {
boolean addSources
) {
try {
File contentDir = JetTestUtils.tmpDir("testLibrary-" + jarName);
File contentDir = KotlinTestUtils.tmpDir("testLibrary-" + jarName);
File outDir = new File(contentDir, "out");
File outputFile = new File(outDir, jarName + ".js");
@@ -26,6 +26,6 @@ public abstract class TestCaseWithTmpdir extends UsefulTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
tmpdir = JetTestUtils.tmpDirForTest(this);
tmpdir = KotlinTestUtils.tmpDirForTest(this);
}
}
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.renderer.*;
import org.jetbrains.kotlin.resolve.DescriptorUtils;
import org.jetbrains.kotlin.resolve.MemberComparator;
import org.jetbrains.kotlin.resolve.scopes.KtScope;
import org.jetbrains.kotlin.test.JetTestUtils;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.utils.Printer;
import org.junit.Assert;
@@ -266,7 +266,7 @@ public class RecursiveDescriptorComparator {
}
if (txtFile != null) {
JetTestUtils.assertEqualsToFile(txtFile, actualSerialized);
KotlinTestUtils.assertEqualsToFile(txtFile, actualSerialized);
}
}
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.resolve.lazy.KotlinTestWithEnvironment;
import org.jetbrains.kotlin.resolve.lazy.LazyEntity;
import org.jetbrains.kotlin.test.JetTestUtils;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.utils.Printer;
import java.io.File;
@@ -36,15 +36,15 @@ import java.util.List;
public class RecursiveDescriptorProcessorTest extends KotlinTestWithEnvironment {
@Override
protected KotlinCoreEnvironment createEnvironment() {
return JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(getTestRootDisposable());
return KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(getTestRootDisposable());
}
public void testRecursive() throws Exception {
File ktFile = new File("compiler/testData/recursiveProcessor/declarations.kt");
File txtFile = new File("compiler/testData/recursiveProcessor/declarations.txt");
String text = FileUtil.loadFile(ktFile, true);
KtFile jetFile = JetTestUtils.createFile("declarations.kt", text, getEnvironment().getProject());
AnalysisResult result = JetTestUtils.analyzeFile(jetFile, getEnvironment());
KtFile jetFile = KotlinTestUtils.createFile("declarations.kt", text, getEnvironment().getProject());
AnalysisResult result = KotlinTestUtils.analyzeFile(jetFile, getEnvironment());
PackageViewDescriptor testPackage = result.getModuleDescriptor().getPackage(FqName.topLevel(Name.identifier("test")));
List<String> descriptors = recursivelyCollectDescriptors(testPackage);