remove Jet from names of classes in tests: phase 2

Original commit: 19af88738b
This commit is contained in:
Dmitry Jemerov
2015-11-03 14:05:20 +01:00
parent b4fdd8ffbb
commit 5fe43b4e72
12 changed files with 221 additions and 222 deletions
@@ -46,7 +46,7 @@ import org.jetbrains.jps.util.JpsPathUtil
import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.jps.build.classFilesComparison.assertEqualDirectories import org.jetbrains.kotlin.jps.build.classFilesComparison.assertEqualDirectories
import org.jetbrains.kotlin.jps.incremental.getKotlinCache import org.jetbrains.kotlin.jps.incremental.getKotlinCache
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.utils.Printer import org.jetbrains.kotlin.utils.Printer
import org.jetbrains.kotlin.utils.keysToMap import org.jetbrains.kotlin.utils.keysToMap
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
@@ -461,7 +461,7 @@ public abstract class AbstractIncrementalJpsTest(
} }
override fun logLine(message: String?) { override fun logLine(message: String?) {
logBuf.append(JetTestUtils.replaceHashWithStar(message!!.removePrefix("$rootPath/"))).append('\n') logBuf.append(KotlinTestUtils.replaceHashWithStar(message!!.removePrefix("$rootPath/"))).append('\n')
} }
} }
@@ -20,7 +20,7 @@ import com.intellij.openapi.util.io.FileUtil
import org.jetbrains.kotlin.incremental.components.LocationInfo import org.jetbrains.kotlin.incremental.components.LocationInfo
import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.incremental.components.ScopeKind import org.jetbrains.kotlin.incremental.components.ScopeKind
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.utils.join import org.jetbrains.kotlin.utils.join
import java.io.File import java.io.File
import java.util.* import java.util.*
@@ -92,7 +92,7 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest(
val actual = lines.joinToString("\n") val actual = lines.joinToString("\n")
JetTestUtils.assertEqualsToFile(expectedFile, actual) KotlinTestUtils.assertEqualsToFile(expectedFile, actual)
} }
for (actualFile in compiledFiles) { for (actualFile in compiledFiles) {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jps.build;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -32,48 +32,48 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class IncrementalCacheVersionChangedTestGenerated extends AbstractIncrementalCacheVersionChangedTest { public class IncrementalCacheVersionChangedTestGenerated extends AbstractIncrementalCacheVersionChangedTest {
public void testAllFilesPresentInCacheVersionChanged() throws Exception { public void testAllFilesPresentInCacheVersionChanged() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("exportedModule") @TestMetadata("exportedModule")
public void testExportedModule() throws Exception { public void testExportedModule() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("module1Modified") @TestMetadata("module1Modified")
public void testModule1Modified() throws Exception { public void testModule1Modified() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("module2Modified") @TestMetadata("module2Modified")
public void testModule2Modified() throws Exception { public void testModule2Modified() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("moduleWithConstantModified") @TestMetadata("moduleWithConstantModified")
public void testModuleWithConstantModified() throws Exception { public void testModuleWithConstantModified() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("moduleWithInlineModified") @TestMetadata("moduleWithInlineModified")
public void testModuleWithInlineModified() throws Exception { public void testModuleWithInlineModified() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("touchedFile") @TestMetadata("touchedFile")
public void testTouchedFile() throws Exception { public void testTouchedFile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("untouchedFiles") @TestMetadata("untouchedFiles")
public void testUntouchedFiles() throws Exception { public void testUntouchedFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles/");
doTest(fileName); doTest(fileName);
} }
File diff suppressed because it is too large Load Diff
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jps.build;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -32,48 +32,48 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class IncrementalLazyCachesTestGenerated extends AbstractIncrementalLazyCachesTest { public class IncrementalLazyCachesTestGenerated extends AbstractIncrementalLazyCachesTest {
public void testAllFilesPresentInLazyKotlinCaches() throws Exception { public void testAllFilesPresentInLazyKotlinCaches() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("class") @TestMetadata("class")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/class/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/class/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("constant") @TestMetadata("constant")
public void testConstant() throws Exception { public void testConstant() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/constant/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/constant/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("function") @TestMetadata("function")
public void testFunction() throws Exception { public void testFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/function/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/function/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineFunctionWithUsage") @TestMetadata("inlineFunctionWithUsage")
public void testInlineFunctionWithUsage() throws Exception { public void testInlineFunctionWithUsage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithUsage/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithUsage/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineFunctionWithoutUsage") @TestMetadata("inlineFunctionWithoutUsage")
public void testInlineFunctionWithoutUsage() throws Exception { public void testInlineFunctionWithoutUsage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithoutUsage/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithoutUsage/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noKotlin") @TestMetadata("noKotlin")
public void testNoKotlin() throws Exception { public void testNoKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/noKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/noKotlin/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelPropertyAccess") @TestMetadata("topLevelPropertyAccess")
public void testTopLevelPropertyAccess() throws Exception { public void testTopLevelPropertyAccess() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/topLevelPropertyAccess/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/topLevelPropertyAccess/");
doTest(fileName); doTest(fileName);
} }
@@ -45,7 +45,7 @@ import org.jetbrains.kotlin.codegen.AsmUtil
import org.jetbrains.kotlin.codegen.JvmCodegenUtil import org.jetbrains.kotlin.codegen.JvmCodegenUtil
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils
import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.MockLibraryUtil import org.jetbrains.kotlin.test.MockLibraryUtil
import org.jetbrains.kotlin.utils.PathUtil import org.jetbrains.kotlin.utils.PathUtil
import org.jetbrains.org.objectweb.asm.ClassReader import org.jetbrains.org.objectweb.asm.ClassReader
@@ -679,7 +679,7 @@ public class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
.map { "${it.messageText} at line ${it.line}, column ${it.column}" }.sorted().joinToString("\n") .map { "${it.messageText} at line ${it.line}, column ${it.column}" }.sorted().joinToString("\n")
val projectRoot = File(AbstractKotlinJpsBuildTestCase.TEST_DATA_PATH + "general/" + getTestName(false)) val projectRoot = File(AbstractKotlinJpsBuildTestCase.TEST_DATA_PATH + "general/" + getTestName(false))
val expectedFile = File(projectRoot, "errors.txt") val expectedFile = File(projectRoot, "errors.txt")
JetTestUtils.assertEqualsToFile(expectedFile, actualErrors) KotlinTestUtils.assertEqualsToFile(expectedFile, actualErrors)
} }
private fun buildCustom(canceledStatus: CanceledStatus, logger: TestProjectBuilderLogger,buildResult: BuildResult) { private fun buildCustom(canceledStatus: CanceledStatus, logger: TestProjectBuilderLogger,buildResult: BuildResult) {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jps.build;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -32,49 +32,48 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class LookupTrackerTestGenerated extends AbstractLookupTrackerTest { public class LookupTrackerTestGenerated extends AbstractLookupTrackerTest {
public void testAllFilesPresentInLookupTracker() throws Exception { public void testAllFilesPresentInLookupTracker() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lookupTracker"), Pattern.compile("^([^\\.]+)$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lookupTracker"), Pattern.compile("^([^\\.]+)$"), false);
} }
@TestMetadata("classifierMembers") @TestMetadata("classifierMembers")
public void testClassifierMembers() throws Exception { public void testClassifierMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/classifierMembers/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/classifierMembers/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("conventions") @TestMetadata("conventions")
public void testConventions() throws Exception { public void testConventions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/conventions/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/conventions/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("java") @TestMetadata("java")
public void testJava() throws Exception { public void testJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/java/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/java/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localDeclarations") @TestMetadata("localDeclarations")
public void testLocalDeclarations() throws Exception { public void testLocalDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/localDeclarations/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/localDeclarations/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("packageDeclarations") @TestMetadata("packageDeclarations")
public void testPackageDeclarations() throws Exception { public void testPackageDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/packageDeclarations/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/packageDeclarations/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simple") @TestMetadata("simple")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/simple/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/simple/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("syntheticProperties") @TestMetadata("syntheticProperties")
public void testSyntheticProperties() throws Exception { public void testSyntheticProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/syntheticProperties/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/syntheticProperties/");
doTest(fileName); doTest(fileName);
} }
} }
@@ -22,13 +22,13 @@ import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_CLIENT_ALIVE_PATH_PROPERTY
import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_ENABLED_PROPERTY import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_ENABLED_PROPERTY
import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_LOG_PATH_PROPERTY import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_LOG_PATH_PROPERTY
import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_VERBOSE_REPORT_PROPERTY import org.jetbrains.kotlin.rmi.COMPILE_DAEMON_VERBOSE_REPORT_PROPERTY
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.File import java.io.File
public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() { public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
workDir = JetTestUtils.tmpDirForTest(this) workDir = KotlinTestUtils.tmpDirForTest(this)
} }
public fun testLoadingKotlinFromDifferentModules() { public fun testLoadingKotlinFromDifferentModules() {
@@ -20,7 +20,7 @@ import com.intellij.openapi.util.io.FileUtil
import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.UsefulTestCase
import org.jetbrains.kotlin.load.kotlin.header.* import org.jetbrains.kotlin.load.kotlin.header.*
import org.jetbrains.kotlin.serialization.jvm.BitEncoding import org.jetbrains.kotlin.serialization.jvm.BitEncoding
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.MockLibraryUtil import org.jetbrains.kotlin.test.MockLibraryUtil
import org.jetbrains.kotlin.utils.Printer import org.jetbrains.kotlin.utils.Printer
import java.io.File import java.io.File
@@ -28,7 +28,7 @@ import java.io.File
public abstract class AbstractProtoComparisonTest : UsefulTestCase() { public abstract class AbstractProtoComparisonTest : UsefulTestCase() {
public fun doTest(testDataPath: String) { public fun doTest(testDataPath: String) {
val testDir = JetTestUtils.tmpDir("testDirectory") val testDir = KotlinTestUtils.tmpDir("testDirectory")
val oldClassFiles = compileFileAndGetClasses(testDataPath, testDir, "old") val oldClassFiles = compileFileAndGetClasses(testDataPath, testDir, "old")
val newClassFiles = compileFileAndGetClasses(testDataPath, testDir, "new") val newClassFiles = compileFileAndGetClasses(testDataPath, testDir, "new")
@@ -58,7 +58,7 @@ public abstract class AbstractProtoComparisonTest : UsefulTestCase() {
p.printDifference(oldClassMap[name]!!, newClassMap[name]!!) p.printDifference(oldClassMap[name]!!, newClassMap[name]!!)
} }
JetTestUtils.assertEqualsToFile(File(testDataPath + File.separator + "result.out"), sb.toString()); KotlinTestUtils.assertEqualsToFile(File(testDataPath + File.separator + "result.out"), sb.toString());
} }
private fun compileFileAndGetClasses(testPath: String, testDir: File, prefix: String): List<File> { private fun compileFileAndGetClasses(testPath: String, testDir: File, prefix: String): List<File> {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jps.incremental;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -34,42 +34,42 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassSignatureChange extends AbstractProtoComparisonTest { public static class ClassSignatureChange extends AbstractProtoComparisonTest {
public void testAllFilesPresentInClassSignatureChange() throws Exception { public void testAllFilesPresentInClassSignatureChange() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("classFlagsChanged") @TestMetadata("classFlagsChanged")
public void testClassFlagsChanged() throws Exception { public void testClassFlagsChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classToFileFacade") @TestMetadata("classToFileFacade")
public void testClassToFileFacade() throws Exception { public void testClassToFileFacade() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classToFileFacade/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classToFileFacade/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classTypeParameterListChanged") @TestMetadata("classTypeParameterListChanged")
public void testClassTypeParameterListChanged() throws Exception { public void testClassTypeParameterListChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithClassAnnotationListChanged") @TestMetadata("classWithClassAnnotationListChanged")
public void testClassWithClassAnnotationListChanged() throws Exception { public void testClassWithClassAnnotationListChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithSuperTypeListChanged") @TestMetadata("classWithSuperTypeListChanged")
public void testClassWithSuperTypeListChanged() throws Exception { public void testClassWithSuperTypeListChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("packageFacadeToClass") @TestMetadata("packageFacadeToClass")
public void testPackageFacadeToClass() throws Exception { public void testPackageFacadeToClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/packageFacadeToClass/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/packageFacadeToClass/");
doTest(fileName); doTest(fileName);
} }
@@ -80,36 +80,36 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassPrivateOnlyChange extends AbstractProtoComparisonTest { public static class ClassPrivateOnlyChange extends AbstractProtoComparisonTest {
public void testAllFilesPresentInClassPrivateOnlyChange() throws Exception { public void testAllFilesPresentInClassPrivateOnlyChange() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("classWithPrivateFunChanged") @TestMetadata("classWithPrivateFunChanged")
public void testClassWithPrivateFunChanged() throws Exception { public void testClassWithPrivateFunChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithPrivatePrimaryConstructorChanged") @TestMetadata("classWithPrivatePrimaryConstructorChanged")
public void testClassWithPrivatePrimaryConstructorChanged() throws Exception { public void testClassWithPrivatePrimaryConstructorChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithPrivateSecondaryConstructorChanged") @TestMetadata("classWithPrivateSecondaryConstructorChanged")
public void testClassWithPrivateSecondaryConstructorChanged() throws Exception { public void testClassWithPrivateSecondaryConstructorChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithPrivateValChanged") @TestMetadata("classWithPrivateValChanged")
public void testClassWithPrivateValChanged() throws Exception { public void testClassWithPrivateValChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithPrivateVarChanged") @TestMetadata("classWithPrivateVarChanged")
public void testClassWithPrivateVarChanged() throws Exception { public void testClassWithPrivateVarChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged/");
doTest(fileName); doTest(fileName);
} }
@@ -120,36 +120,36 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassMembersOnlyChanged extends AbstractProtoComparisonTest { public static class ClassMembersOnlyChanged extends AbstractProtoComparisonTest {
public void testAllFilesPresentInClassMembersOnlyChanged() throws Exception { public void testAllFilesPresentInClassMembersOnlyChanged() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("classWithCompanionObjectChanged") @TestMetadata("classWithCompanionObjectChanged")
public void testClassWithCompanionObjectChanged() throws Exception { public void testClassWithCompanionObjectChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithConstructorChanged") @TestMetadata("classWithConstructorChanged")
public void testClassWithConstructorChanged() throws Exception { public void testClassWithConstructorChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithFunAndValChanged") @TestMetadata("classWithFunAndValChanged")
public void testClassWithFunAndValChanged() throws Exception { public void testClassWithFunAndValChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithNestedClassesChanged") @TestMetadata("classWithNestedClassesChanged")
public void testClassWithNestedClassesChanged() throws Exception { public void testClassWithNestedClassesChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWitnEnumChanged") @TestMetadata("classWitnEnumChanged")
public void testClassWitnEnumChanged() throws Exception { public void testClassWitnEnumChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged/");
doTest(fileName); doTest(fileName);
} }
@@ -160,24 +160,24 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PackageMembers extends AbstractProtoComparisonTest { public static class PackageMembers extends AbstractProtoComparisonTest {
public void testAllFilesPresentInPackageMembers() throws Exception { public void testAllFilesPresentInPackageMembers() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("packageFacadeMultifileClassChanged") @TestMetadata("packageFacadeMultifileClassChanged")
public void testPackageFacadeMultifileClassChanged() throws Exception { public void testPackageFacadeMultifileClassChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadeMultifileClassChanged/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadeMultifileClassChanged/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("packageFacadePrivateOnlyChanges") @TestMetadata("packageFacadePrivateOnlyChanges")
public void testPackageFacadePrivateOnlyChanges() throws Exception { public void testPackageFacadePrivateOnlyChanges() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("packageFacadePublicChanges") @TestMetadata("packageFacadePublicChanges")
public void testPackageFacadePublicChanges() throws Exception { public void testPackageFacadePublicChanges() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges/");
doTest(fileName); doTest(fileName);
} }
@@ -188,18 +188,18 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Unchanged extends AbstractProtoComparisonTest { public static class Unchanged extends AbstractProtoComparisonTest {
public void testAllFilesPresentInUnchanged() throws Exception { public void testAllFilesPresentInUnchanged() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("unchangedClass") @TestMetadata("unchangedClass")
public void testUnchangedClass() throws Exception { public void testUnchangedClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedClass/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedClass/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unchangedPackageFacade") @TestMetadata("unchangedPackageFacade")
public void testUnchangedPackageFacade() throws Exception { public void testUnchangedPackageFacade() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade/"); String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade/");
doTest(fileName); doTest(fileName);
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler
import org.jetbrains.jps.builders.java.JavaModuleBuildTargetType import org.jetbrains.jps.builders.java.JavaModuleBuildTargetType
import org.jetbrains.kotlin.modules.KotlinModuleXmlBuilder import org.jetbrains.kotlin.modules.KotlinModuleXmlBuilder
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.MockLibraryUtil import org.jetbrains.kotlin.test.MockLibraryUtil
import org.jetbrains.kotlin.test.TestCaseWithTmpdir import org.jetbrains.kotlin.test.TestCaseWithTmpdir
import org.jetbrains.kotlin.utils.PathUtil import org.jetbrains.kotlin.utils.PathUtil
@@ -31,7 +31,7 @@ import java.io.File
*/ */
public class ClasspathOrderTest : TestCaseWithTmpdir() { public class ClasspathOrderTest : TestCaseWithTmpdir() {
companion object { companion object {
val sourceDir = File(JetTestUtils.getTestDataPathBase() + "/classpathOrder").getAbsoluteFile() val sourceDir = File(KotlinTestUtils.getTestDataPathBase() + "/classpathOrder").getAbsoluteFile()
} }
public fun testClasspathOrderForCLI() { public fun testClasspathOrderForCLI() {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.modules;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.jetbrains.jps.builders.java.JavaModuleBuildTargetType; import org.jetbrains.jps.builders.java.JavaModuleBuildTargetType;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
@@ -35,7 +35,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase {
JavaModuleBuildTargetType.PRODUCTION, JavaModuleBuildTargetType.PRODUCTION,
Collections.<File>emptySet() Collections.<File>emptySet()
).asText().toString(); ).asText().toString();
JetTestUtils.assertEqualsToFile(new File("idea/testData/modules.xml/basic.xml"), actual); KotlinTestUtils.assertEqualsToFile(new File("idea/testData/modules.xml/basic.xml"), actual);
} }
public void testFiltered() throws Exception { public void testFiltered() throws Exception {
@@ -48,7 +48,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase {
JavaModuleBuildTargetType.PRODUCTION, JavaModuleBuildTargetType.PRODUCTION,
Collections.singleton(new File("cp1")) Collections.singleton(new File("cp1"))
).asText().toString(); ).asText().toString();
JetTestUtils.assertEqualsToFile(new File("idea/testData/modules.xml/filtered.xml"), actual); KotlinTestUtils.assertEqualsToFile(new File("idea/testData/modules.xml/filtered.xml"), actual);
} }
public void testMultiple() throws Exception { public void testMultiple() throws Exception {
@@ -72,6 +72,6 @@ public class KotlinModuleXmlGeneratorTest extends TestCase {
Collections.singleton(new File("cp12")) Collections.singleton(new File("cp12"))
); );
String actual = builder.asText().toString(); String actual = builder.asText().toString();
JetTestUtils.assertEqualsToFile(new File("idea/testData/modules.xml/multiple.xml"), actual); KotlinTestUtils.assertEqualsToFile(new File("idea/testData/modules.xml/multiple.xml"), actual);
} }
} }