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
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.generators.tests.generator.TestGeneratorUtil;
import org.jetbrains.kotlin.idea.KotlinFileType; import org.jetbrains.kotlin.idea.KotlinFileType;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.Printer; import org.jetbrains.kotlin.utils.Printer;
import org.junit.Assert; import org.junit.Assert;
@@ -143,10 +143,10 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
private KotlinCoreEnvironment createEnvironment(boolean isFullJdk) { private KotlinCoreEnvironment createEnvironment(boolean isFullJdk) {
return isFullJdk ? return isFullJdk ?
JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea( KotlinTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
myTestRootDisposable, ConfigurationKind.ALL, TestJdkKind.FULL_JDK myTestRootDisposable, ConfigurationKind.ALL, TestJdkKind.FULL_JDK
) : ) :
JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable); KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable);
} }
public boolean shouldWriteFilesOnDisk() { public boolean shouldWriteFilesOnDisk() {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.checkers;
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;
@@ -30,40 +30,40 @@ import java.util.regex.Pattern;
@TestMetadata("compiler/testData/diagnostics/testsWithJava8") @TestMetadata("compiler/testData/diagnostics/testsWithJava8")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class JetDiagnosticsWithJava8TestGenerated extends AbstractJetDiagnosticsWithFullJdkTest { public class DiagnosticsWithJava8TestGenerated extends AbstractDiagnosticsWithFullJdkTest {
public void testAllFilesPresentInTestsWithJava8() throws Exception { public void testAllFilesPresentInTestsWithJava8() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/diagnostics/testsWithJava8/annotations") @TestMetadata("compiler/testData/diagnostics/testsWithJava8/annotations")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Annotations extends AbstractJetDiagnosticsWithFullJdkTest { public static class Annotations extends AbstractDiagnosticsWithFullJdkTest {
public void testAllFilesPresentInAnnotations() throws Exception { public void testAllFilesPresentInAnnotations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/annotations"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("deprecatedRepeatable.kt") @TestMetadata("deprecatedRepeatable.kt")
public void testDeprecatedRepeatable() throws Exception { public void testDeprecatedRepeatable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/deprecatedRepeatable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/deprecatedRepeatable.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("javaRepeatable.kt") @TestMetadata("javaRepeatable.kt")
public void testJavaRepeatable() throws Exception { public void testJavaRepeatable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/javaRepeatable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/javaRepeatable.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("javaRepeatableRetention.kt") @TestMetadata("javaRepeatableRetention.kt")
public void testJavaRepeatableRetention() throws Exception { public void testJavaRepeatableRetention() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/javaRepeatableRetention.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/javaRepeatableRetention.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("javaUnrepeatable.kt") @TestMetadata("javaUnrepeatable.kt")
public void testJavaUnrepeatable() throws Exception { public void testJavaUnrepeatable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/javaUnrepeatable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/annotations/javaUnrepeatable.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -71,28 +71,28 @@ public class JetDiagnosticsWithJava8TestGenerated extends AbstractJetDiagnostics
@TestMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature") @TestMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DuplicateJvmSignature extends AbstractJetDiagnosticsWithFullJdkTest { public static class DuplicateJvmSignature extends AbstractDiagnosticsWithFullJdkTest {
public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { public void testAllFilesPresentInDuplicateJvmSignature() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics") @TestMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Statics extends AbstractJetDiagnosticsWithFullJdkTest { public static class Statics extends AbstractDiagnosticsWithFullJdkTest {
public void testAllFilesPresentInStatics() throws Exception { public void testAllFilesPresentInStatics() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("jjk.kt") @TestMetadata("jjk.kt")
public void testJjk() throws Exception { public void testJjk() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics/jjk.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics/jjk.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("jk.kt") @TestMetadata("jk.kt")
public void testJk() throws Exception { public void testJk() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics/jk.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/duplicateJvmSignature/statics/jk.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -101,14 +101,14 @@ public class JetDiagnosticsWithJava8TestGenerated extends AbstractJetDiagnostics
@TestMetadata("compiler/testData/diagnostics/testsWithJava8/statics") @TestMetadata("compiler/testData/diagnostics/testsWithJava8/statics")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Statics extends AbstractJetDiagnosticsWithFullJdkTest { public static class Statics extends AbstractDiagnosticsWithFullJdkTest {
public void testAllFilesPresentInStatics() throws Exception { public void testAllFilesPresentInStatics() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/statics"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/statics"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("inheritanceStaticMethodFromInterface.kt") @TestMetadata("inheritanceStaticMethodFromInterface.kt")
public void testInheritanceStaticMethodFromInterface() throws Exception { public void testInheritanceStaticMethodFromInterface() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/statics/inheritanceStaticMethodFromInterface.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/statics/inheritanceStaticMethodFromInterface.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.generated;
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,60 +32,60 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodegenTest { public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInBoxWithJava() throws Exception { public void testAllFilesPresentInBoxWithJava() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/boxWithJava"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/boxWithJava"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("defaultMethodCallFromTrait") @TestMetadata("defaultMethodCallFromTrait")
public void testDefaultMethodCallFromTrait() throws Exception { public void testDefaultMethodCallFromTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallFromTrait/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallFromTrait/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("defaultMethodCallViaClass") @TestMetadata("defaultMethodCallViaClass")
public void testDefaultMethodCallViaClass() throws Exception { public void testDefaultMethodCallViaClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaClass/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaClass/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("defaultMethodCallViaTrait") @TestMetadata("defaultMethodCallViaTrait")
public void testDefaultMethodCallViaTrait() throws Exception { public void testDefaultMethodCallViaTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodCallViaTrait/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("defaultMethodOverride") @TestMetadata("defaultMethodOverride")
public void testDefaultMethodOverride() throws Exception { public void testDefaultMethodOverride() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodOverride/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/defaultMethodOverride/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("dontDelegateToDefaultMethods") @TestMetadata("dontDelegateToDefaultMethods")
public void testDontDelegateToDefaultMethods() throws Exception { public void testDontDelegateToDefaultMethods() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/dontDelegateToDefaultMethods/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/dontDelegateToDefaultMethods/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("inheritKotlin") @TestMetadata("inheritKotlin")
public void testInheritKotlin() throws Exception { public void testInheritKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/inheritKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/inheritKotlin/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("invokeDefaultViaSuper") @TestMetadata("invokeDefaultViaSuper")
public void testInvokeDefaultViaSuper() throws Exception { public void testInvokeDefaultViaSuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/invokeDefaultViaSuper/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/invokeDefaultViaSuper/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault") @TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault")
public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception { public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/longChainOfKotlinExtendsFromJavaWithDefault/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/longChainOfKotlinExtendsFromJavaWithDefault/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("samOnInterfaceWithDefaultMethod") @TestMetadata("samOnInterfaceWithDefaultMethod")
public void testSamOnInterfaceWithDefaultMethod() throws Exception { public void testSamOnInterfaceWithDefaultMethod() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/samOnInterfaceWithDefaultMethod/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/samOnInterfaceWithDefaultMethod/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -94,18 +94,18 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Reflection extends AbstractBlackBoxCodegenTest { public static class Reflection extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInReflection() throws Exception { public void testAllFilesPresentInReflection() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("realParameterNames") @TestMetadata("realParameterNames")
public void testRealParameterNames() throws Exception { public void testRealParameterNames() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/reflection/realParameterNames/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/reflection/realParameterNames/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("synthesizedParameterNames") @TestMetadata("synthesizedParameterNames")
public void testSynthesizedParameterNames() throws Exception { public void testSynthesizedParameterNames() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/reflection/synthesizedParameterNames/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/boxWithJava/reflection/synthesizedParameterNames/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.checkers.KotlinMultiFileTestWithWithJava;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
@@ -38,10 +38,10 @@ public abstract class AbstractCompilerLightClassTest extends KotlinMultiFileTest
@Override @Override
@NotNull @NotNull
protected CompilerConfiguration createCompilerConfiguration(File javaFilesDir) { protected CompilerConfiguration createCompilerConfiguration(File javaFilesDir) {
return JetTestUtils.compilerConfigurationForTests( return KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.ALL, ConfigurationKind.ALL,
TestJdkKind.MOCK_JDK, TestJdkKind.MOCK_JDK,
Arrays.asList(JetTestUtils.getAnnotationsJar()), Arrays.asList(KotlinTestUtils.getAnnotationsJar()),
Arrays.asList(javaFilesDir) Arrays.asList(javaFilesDir)
); );
} }
@@ -55,7 +55,7 @@ public abstract class AbstractCompilerLightClassTest extends KotlinMultiFileTest
@NotNull @NotNull
public static JavaElementFinder createFinder(@NotNull KotlinCoreEnvironment environment) throws IOException { public static JavaElementFinder createFinder(@NotNull KotlinCoreEnvironment environment) throws IOException {
// We need to resolve all the files in order too fill in the trace that sits inside LightClassGenerationSupport // We need to resolve all the files in order too fill in the trace that sits inside LightClassGenerationSupport
JetTestUtils.resolveAllKotlinFiles(environment); KotlinTestUtils.resolveAllKotlinFiles(environment);
return JavaElementFinder.getInstance(environment.getProject()); return JavaElementFinder.getInstance(environment.getProject());
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.asJava;
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,12 +32,12 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassTest { public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassTest {
public void testAllFilesPresentInLightClasses() throws Exception { public void testAllFilesPresentInLightClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("annotationClass.kt") @TestMetadata("annotationClass.kt")
public void testAnnotationClass() throws Exception { public void testAnnotationClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/annotationClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/annotationClass.kt");
doTest(fileName); doTest(fileName);
} }
@@ -46,24 +46,24 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Delegation extends AbstractCompilerLightClassTest { public static class Delegation extends AbstractCompilerLightClassTest {
public void testAllFilesPresentInDelegation() throws Exception { public void testAllFilesPresentInDelegation() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/delegation"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/delegation"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Function.kt") @TestMetadata("Function.kt")
public void testFunction() throws Exception { public void testFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Function.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Function.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Property.kt") @TestMetadata("Property.kt")
public void testProperty() throws Exception { public void testProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Property.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Property.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("WithPlatformTypes.kt") @TestMetadata("WithPlatformTypes.kt")
public void testWithPlatformTypes() throws Exception { public void testWithPlatformTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/WithPlatformTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/WithPlatformTypes.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -73,24 +73,24 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Facades extends AbstractCompilerLightClassTest { public static class Facades extends AbstractCompilerLightClassTest {
public void testAllFilesPresentInFacades() throws Exception { public void testAllFilesPresentInFacades() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/facades"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/facades"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("EmptyFile.kt") @TestMetadata("EmptyFile.kt")
public void testEmptyFile() throws Exception { public void testEmptyFile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/EmptyFile.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/EmptyFile.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SingleFile.kt") @TestMetadata("SingleFile.kt")
public void testSingleFile() throws Exception { public void testSingleFile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleFile.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SingleJvmClassName.kt") @TestMetadata("SingleJvmClassName.kt")
public void testSingleJvmClassName() throws Exception { public void testSingleJvmClassName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -100,126 +100,126 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class NullabilityAnnotations extends AbstractCompilerLightClassTest { public static class NullabilityAnnotations extends AbstractCompilerLightClassTest {
public void testAllFilesPresentInNullabilityAnnotations() throws Exception { public void testAllFilesPresentInNullabilityAnnotations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/nullabilityAnnotations"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/nullabilityAnnotations"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Class.kt") @TestMetadata("Class.kt")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassObjectField.kt") @TestMetadata("ClassObjectField.kt")
public void testClassObjectField() throws Exception { public void testClassObjectField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassWithConstructor.kt") @TestMetadata("ClassWithConstructor.kt")
public void testClassWithConstructor() throws Exception { public void testClassWithConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassWithConstructorAndProperties.kt") @TestMetadata("ClassWithConstructorAndProperties.kt")
public void testClassWithConstructorAndProperties() throws Exception { public void testClassWithConstructorAndProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FileFacade.kt") @TestMetadata("FileFacade.kt")
public void testFileFacade() throws Exception { public void testFileFacade() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Generic.kt") @TestMetadata("Generic.kt")
public void testGeneric() throws Exception { public void testGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntOverridesAny.kt") @TestMetadata("IntOverridesAny.kt")
public void testIntOverridesAny() throws Exception { public void testIntOverridesAny() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("JvmOverloads.kt") @TestMetadata("JvmOverloads.kt")
public void testJvmOverloads() throws Exception { public void testJvmOverloads() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NullableUnitReturn.kt") @TestMetadata("NullableUnitReturn.kt")
public void testNullableUnitReturn() throws Exception { public void testNullableUnitReturn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OverrideAnyWithUnit.kt") @TestMetadata("OverrideAnyWithUnit.kt")
public void testOverrideAnyWithUnit() throws Exception { public void testOverrideAnyWithUnit() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PlatformTypes.kt") @TestMetadata("PlatformTypes.kt")
public void testPlatformTypes() throws Exception { public void testPlatformTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Primitives.kt") @TestMetadata("Primitives.kt")
public void testPrimitives() throws Exception { public void testPrimitives() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PrivateInClass.kt") @TestMetadata("PrivateInClass.kt")
public void testPrivateInClass() throws Exception { public void testPrivateInClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PrivateInTrait.kt") @TestMetadata("PrivateInTrait.kt")
public void testPrivateInTrait() throws Exception { public void testPrivateInTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInTrait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInTrait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Synthetic.kt") @TestMetadata("Synthetic.kt")
public void testSynthetic() throws Exception { public void testSynthetic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Trait.kt") @TestMetadata("Trait.kt")
public void testTrait() throws Exception { public void testTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("TraitClassObjectField.kt") @TestMetadata("TraitClassObjectField.kt")
public void testTraitClassObjectField() throws Exception { public void testTraitClassObjectField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/TraitClassObjectField.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("UnitAsGenericArgument.kt") @TestMetadata("UnitAsGenericArgument.kt")
public void testUnitAsGenericArgument() throws Exception { public void testUnitAsGenericArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("UnitParameter.kt") @TestMetadata("UnitParameter.kt")
public void testUnitParameter() throws Exception { public void testUnitParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VoidReturn.kt") @TestMetadata("VoidReturn.kt")
public void testVoidReturn() throws Exception { public void testVoidReturn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -229,12 +229,12 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Object extends AbstractCompilerLightClassTest { public static class Object extends AbstractCompilerLightClassTest {
public void testAllFilesPresentInObject() throws Exception { public void testAllFilesPresentInObject() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/object"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/object"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("SimpleObject.kt") @TestMetadata("SimpleObject.kt")
public void testSimpleObject() throws Exception { public void testSimpleObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/object/SimpleObject.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -244,18 +244,18 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PublicField extends AbstractCompilerLightClassTest { public static class PublicField extends AbstractCompilerLightClassTest {
public void testAllFilesPresentInPublicField() throws Exception { public void testAllFilesPresentInPublicField() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/publicField"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/publicField"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("CompanionObject.kt") @TestMetadata("CompanionObject.kt")
public void testCompanionObject() throws Exception { public void testCompanionObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Simple.kt") @TestMetadata("Simple.kt")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/Simple.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -23,7 +23,7 @@ import com.intellij.psi.search.GlobalSearchScope;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt; import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt;
import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.util.Collections; import java.util.Collections;
@@ -39,7 +39,7 @@ public class LightClassAnnotationsTest extends KotlinAsJavaTestBase {
@Override @Override
protected void extraConfiguration(@NotNull CompilerConfiguration configuration) { protected void extraConfiguration(@NotNull CompilerConfiguration configuration) {
JvmContentRootsKt.addJvmClasspathRoot(configuration, JetTestUtils.getAnnotationsJar()); JvmContentRootsKt.addJvmClasspathRoot(configuration, KotlinTestUtils.getAnnotationsJar());
} }
public void testExtraAnnotations() throws Exception { public void testExtraAnnotations() throws Exception {
@@ -64,6 +64,6 @@ public class LightClassAnnotationsTest extends KotlinAsJavaTestBase {
sb.append(annotation.getText()).append("\n"); sb.append(annotation.getText()).append("\n");
} }
JetTestUtils.assertEqualsToFile(new File(testDir, getTestName(false) + ".annotations.txt"), sb.toString()); KotlinTestUtils.assertEqualsToFile(new File(testDir, getTestName(false) + ".annotations.txt"), sb.toString());
} }
} }
@@ -20,7 +20,7 @@ import com.intellij.openapi.util.io.FileUtil
import com.intellij.psi.PsiClass import com.intellij.psi.PsiClass
import com.intellij.psi.impl.compiled.ClsElementImpl import com.intellij.psi.impl.compiled.ClsElementImpl
import junit.framework.TestCase import junit.framework.TestCase
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.File import java.io.File
import java.util.regex.Pattern import java.util.regex.Pattern
@@ -41,7 +41,7 @@ object LightClassTestCommon {
val lightClass = findLightClass(fqName) val lightClass = findLightClass(fqName)
val actual = actualText(fqName, lightClass, normalizeText) val actual = actualText(fqName, lightClass, normalizeText)
JetTestUtils.assertEqualsToFile(JetTestUtils.replaceExtension(testDataFile, "java"), actual) KotlinTestUtils.assertEqualsToFile(KotlinTestUtils.replaceExtension(testDataFile, "java"), actual)
} }
private fun actualText(fqName: String?, lightClass: PsiClass?, normalizeText: (String) -> String): String { private fun actualText(fqName: String?, lightClass: PsiClass?, normalizeText: (String) -> String): String {
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.psi.*;
import org.jetbrains.kotlin.resolve.BindingContext; import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.lazy.KotlinTestWithEnvironment; import org.jetbrains.kotlin.resolve.lazy.KotlinTestWithEnvironment;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@@ -51,10 +51,10 @@ public abstract class AbstractPseudocodeTest extends KotlinTestWithEnvironment {
protected void doTest(String fileName) throws Exception { protected void doTest(String fileName) throws Exception {
File file = new File(fileName); File file = new File(fileName);
KtFile jetFile = JetTestUtils.loadJetFile(getProject(), file); KtFile jetFile = KotlinTestUtils.loadJetFile(getProject(), file);
Map<KtElement, Pseudocode> data = new LinkedHashMap<KtElement, Pseudocode>(); Map<KtElement, Pseudocode> data = new LinkedHashMap<KtElement, Pseudocode>();
AnalysisResult analysisResult = JetTestUtils.analyzeFile(jetFile, getEnvironment()); AnalysisResult analysisResult = KotlinTestUtils.analyzeFile(jetFile, getEnvironment());
List<KtDeclaration> declarations = jetFile.getDeclarations(); List<KtDeclaration> declarations = jetFile.getDeclarations();
BindingContext bindingContext = analysisResult.getBindingContext(); BindingContext bindingContext = analysisResult.getBindingContext();
for (KtDeclaration declaration : declarations) { for (KtDeclaration declaration : declarations) {
@@ -126,8 +126,8 @@ public abstract class AbstractPseudocodeTest extends KotlinTestWithEnvironment {
checkPseudocode((PseudocodeImpl) pseudocode); checkPseudocode((PseudocodeImpl) pseudocode);
} }
File expectedInstructionsFile = JetTestUtils.replaceExtension(file, getDataFileExtension()); File expectedInstructionsFile = KotlinTestUtils.replaceExtension(file, getDataFileExtension());
JetTestUtils.assertEqualsToFile(expectedInstructionsFile, instructionDump.toString()); KotlinTestUtils.assertEqualsToFile(expectedInstructionsFile, instructionDump.toString());
} }
protected String getDataFileExtension() { protected String getDataFileExtension() {
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.cfg.pseudocode.instructions.special.SubroutineExitIn
import org.jetbrains.kotlin.cfg.pseudocode.instructions.special.SubroutineSinkInstruction; import org.jetbrains.kotlin.cfg.pseudocode.instructions.special.SubroutineSinkInstruction;
import org.jetbrains.kotlin.psi.KtElement; import org.jetbrains.kotlin.psi.KtElement;
import org.jetbrains.kotlin.psi.KtNamedDeclaration; import org.jetbrains.kotlin.psi.KtNamedDeclaration;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
@@ -41,7 +41,7 @@ import java.util.*;
public class CFGraphToDotFilePrinter { public class CFGraphToDotFilePrinter {
public static void dumpDot(File file, Collection<Pseudocode> pseudocodes) throws FileNotFoundException { public static void dumpDot(File file, Collection<Pseudocode> pseudocodes) throws FileNotFoundException {
File target = JetTestUtils.replaceExtension(file, "dot"); File target = KotlinTestUtils.replaceExtension(file, "dot");
PrintStream out = new PrintStream(target); PrintStream out = new PrintStream(target);
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.cfg;
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,7 +32,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ControlFlowTestGenerated extends AbstractControlFlowTest { public class ControlFlowTestGenerated extends AbstractControlFlowTest {
public void testAllFilesPresentInCfg() throws Exception { public void testAllFilesPresentInCfg() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/cfg/arrays") @TestMetadata("compiler/testData/cfg/arrays")
@@ -40,66 +40,66 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Arrays extends AbstractControlFlowTest { public static class Arrays extends AbstractControlFlowTest {
public void testAllFilesPresentInArrays() throws Exception { public void testAllFilesPresentInArrays() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ArrayAccess.kt") @TestMetadata("ArrayAccess.kt")
public void testArrayAccess() throws Exception { public void testArrayAccess() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayAccess.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayAccess.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arrayAccessExpression.kt") @TestMetadata("arrayAccessExpression.kt")
public void testArrayAccessExpression() throws Exception { public void testArrayAccessExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayAccessExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayAccessExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arrayInc.kt") @TestMetadata("arrayInc.kt")
public void testArrayInc() throws Exception { public void testArrayInc() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayInc.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayInc.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arrayIncUnresolved.kt") @TestMetadata("arrayIncUnresolved.kt")
public void testArrayIncUnresolved() throws Exception { public void testArrayIncUnresolved() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayIncUnresolved.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayIncUnresolved.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ArrayOfFunctions.kt") @TestMetadata("ArrayOfFunctions.kt")
public void testArrayOfFunctions() throws Exception { public void testArrayOfFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayOfFunctions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayOfFunctions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySet.kt") @TestMetadata("arraySet.kt")
public void testArraySet() throws Exception { public void testArraySet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetNoRHS.kt") @TestMetadata("arraySetNoRHS.kt")
public void testArraySetNoRHS() throws Exception { public void testArraySetNoRHS() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetNoRHS.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetNoRHS.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetPlusAssign.kt") @TestMetadata("arraySetPlusAssign.kt")
public void testArraySetPlusAssign() throws Exception { public void testArraySetPlusAssign() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssign.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssign.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetPlusAssignUnresolved.kt") @TestMetadata("arraySetPlusAssignUnresolved.kt")
public void testArraySetPlusAssignUnresolved() throws Exception { public void testArraySetPlusAssignUnresolved() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetUnresolved.kt") @TestMetadata("arraySetUnresolved.kt")
public void testArraySetUnresolved() throws Exception { public void testArraySetUnresolved() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetUnresolved.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetUnresolved.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -109,24 +109,24 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Basic extends AbstractControlFlowTest { public static class Basic extends AbstractControlFlowTest {
public void testAllFilesPresentInBasic() throws Exception { public void testAllFilesPresentInBasic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Basic.kt") @TestMetadata("Basic.kt")
public void testBasic() throws Exception { public void testBasic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/basic/Basic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/Basic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("EmptyFunction.kt") @TestMetadata("EmptyFunction.kt")
public void testEmptyFunction() throws Exception { public void testEmptyFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/basic/EmptyFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/EmptyFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ShortFunction.kt") @TestMetadata("ShortFunction.kt")
public void testShortFunction() throws Exception { public void testShortFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/basic/ShortFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/ShortFunction.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -136,18 +136,18 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Bugs extends AbstractControlFlowTest { public static class Bugs extends AbstractControlFlowTest {
public void testAllFilesPresentInBugs() throws Exception { public void testAllFilesPresentInBugs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("jumpToOuterScope.kt") @TestMetadata("jumpToOuterScope.kt")
public void testJumpToOuterScope() throws Exception { public void testJumpToOuterScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/bugs/jumpToOuterScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/jumpToOuterScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt7761.kt") @TestMetadata("kt7761.kt")
public void testKt7761() throws Exception { public void testKt7761() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt7761.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt7761.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -157,78 +157,78 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ControlStructures extends AbstractControlFlowTest { public static class ControlStructures extends AbstractControlFlowTest {
public void testAllFilesPresentInControlStructures() throws Exception { public void testAllFilesPresentInControlStructures() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("continueInDoWhile.kt") @TestMetadata("continueInDoWhile.kt")
public void testContinueInDoWhile() throws Exception { public void testContinueInDoWhile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInDoWhile.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInDoWhile.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("continueInFor.kt") @TestMetadata("continueInFor.kt")
public void testContinueInFor() throws Exception { public void testContinueInFor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInFor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInFor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("continueInWhile.kt") @TestMetadata("continueInWhile.kt")
public void testContinueInWhile() throws Exception { public void testContinueInWhile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInWhile.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInWhile.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Finally.kt") @TestMetadata("Finally.kt")
public void testFinally() throws Exception { public void testFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/Finally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/Finally.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FinallyTestCopy.kt") @TestMetadata("FinallyTestCopy.kt")
public void testFinallyTestCopy() throws Exception { public void testFinallyTestCopy() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("For.kt") @TestMetadata("For.kt")
public void testFor() throws Exception { public void testFor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/For.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/For.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("If.kt") @TestMetadata("If.kt")
public void testIf() throws Exception { public void testIf() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/If.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/If.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localAndNonlocalReturnsWithFinally.kt") @TestMetadata("localAndNonlocalReturnsWithFinally.kt")
public void testLocalAndNonlocalReturnsWithFinally() throws Exception { public void testLocalAndNonlocalReturnsWithFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OnlyWhileInFunctionBody.kt") @TestMetadata("OnlyWhileInFunctionBody.kt")
public void testOnlyWhileInFunctionBody() throws Exception { public void testOnlyWhileInFunctionBody() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("returnsInWhen.kt") @TestMetadata("returnsInWhen.kt")
public void testReturnsInWhen() throws Exception { public void testReturnsInWhen() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/returnsInWhen.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/returnsInWhen.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whenConditions.kt") @TestMetadata("whenConditions.kt")
public void testWhenConditions() throws Exception { public void testWhenConditions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenConditions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenConditions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whenExhaustive.kt") @TestMetadata("whenExhaustive.kt")
public void testWhenExhaustive() throws Exception { public void testWhenExhaustive() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenExhaustive.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenExhaustive.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -238,60 +238,60 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Conventions extends AbstractControlFlowTest { public static class Conventions extends AbstractControlFlowTest {
public void testAllFilesPresentInConventions() throws Exception { public void testAllFilesPresentInConventions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("bothReceivers.kt") @TestMetadata("bothReceivers.kt")
public void testBothReceivers() throws Exception { public void testBothReceivers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/bothReceivers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/bothReceivers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("complexAssignmentWithGetSetViaVar.kt") @TestMetadata("complexAssignmentWithGetSetViaVar.kt")
public void testComplexAssignmentWithGetSetViaVar() throws Exception { public void testComplexAssignmentWithGetSetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithGetSetViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithGetSetViaVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("complexAssignmentWithSetViaVar.kt") @TestMetadata("complexAssignmentWithSetViaVar.kt")
public void testComplexAssignmentWithSetViaVar() throws Exception { public void testComplexAssignmentWithSetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithSetViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithSetViaVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("equals.kt") @TestMetadata("equals.kt")
public void testEquals() throws Exception { public void testEquals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("getViaVar.kt") @TestMetadata("getViaVar.kt")
public void testGetViaVar() throws Exception { public void testGetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/getViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/getViaVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("incrementAtTheEnd.kt") @TestMetadata("incrementAtTheEnd.kt")
public void testIncrementAtTheEnd() throws Exception { public void testIncrementAtTheEnd() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invoke.kt") @TestMetadata("invoke.kt")
public void testInvoke() throws Exception { public void testInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/invoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/invoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("notEqual.kt") @TestMetadata("notEqual.kt")
public void testNotEqual() throws Exception { public void testNotEqual() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("setViaVar.kt") @TestMetadata("setViaVar.kt")
public void testSetViaVar() throws Exception { public void testSetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/setViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/setViaVar.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -301,24 +301,24 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DeadCode extends AbstractControlFlowTest { public static class DeadCode extends AbstractControlFlowTest {
public void testAllFilesPresentInDeadCode() throws Exception { public void testAllFilesPresentInDeadCode() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/deadCode"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/deadCode"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DeadCode.kt") @TestMetadata("DeadCode.kt")
public void testDeadCode() throws Exception { public void testDeadCode() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/DeadCode.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/DeadCode.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("returnInElvis.kt") @TestMetadata("returnInElvis.kt")
public void testReturnInElvis() throws Exception { public void testReturnInElvis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/returnInElvis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/returnInElvis.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("stringTemplate.kt") @TestMetadata("stringTemplate.kt")
public void testStringTemplate() throws Exception { public void testStringTemplate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/stringTemplate.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/stringTemplate.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -328,7 +328,7 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Declarations extends AbstractControlFlowTest { public static class Declarations extends AbstractControlFlowTest {
public void testAllFilesPresentInDeclarations() throws Exception { public void testAllFilesPresentInDeclarations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/cfg/declarations/classesAndObjects") @TestMetadata("compiler/testData/cfg/declarations/classesAndObjects")
@@ -336,24 +336,24 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassesAndObjects extends AbstractControlFlowTest { public static class ClassesAndObjects extends AbstractControlFlowTest {
public void testAllFilesPresentInClassesAndObjects() throws Exception { public void testAllFilesPresentInClassesAndObjects() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("AnonymousInitializers.kt") @TestMetadata("AnonymousInitializers.kt")
public void testAnonymousInitializers() throws Exception { public void testAnonymousInitializers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationByExpression.kt") @TestMetadata("delegationByExpression.kt")
public void testDelegationByExpression() throws Exception { public void testDelegationByExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationBySuperCall.kt") @TestMetadata("delegationBySuperCall.kt")
public void testDelegationBySuperCall() throws Exception { public void testDelegationBySuperCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -363,12 +363,12 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class FunctionLiterals extends AbstractControlFlowTest { public static class FunctionLiterals extends AbstractControlFlowTest {
public void testAllFilesPresentInFunctionLiterals() throws Exception { public void testAllFilesPresentInFunctionLiterals() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("unusedFunctionLiteral.kt") @TestMetadata("unusedFunctionLiteral.kt")
public void testUnusedFunctionLiteral() throws Exception { public void testUnusedFunctionLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -378,36 +378,36 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Functions extends AbstractControlFlowTest { public static class Functions extends AbstractControlFlowTest {
public void testAllFilesPresentInFunctions() throws Exception { public void testAllFilesPresentInFunctions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("anonymousFunctionInBlock.kt") @TestMetadata("anonymousFunctionInBlock.kt")
public void testAnonymousFunctionInBlock() throws Exception { public void testAnonymousFunctionInBlock() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FailFunction.kt") @TestMetadata("FailFunction.kt")
public void testFailFunction() throws Exception { public void testFailFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/FailFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/FailFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionAsExpression.kt") @TestMetadata("functionAsExpression.kt")
public void testFunctionAsExpression() throws Exception { public void testFunctionAsExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/functionAsExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/functionAsExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("namedFunctionInBlock.kt") @TestMetadata("namedFunctionInBlock.kt")
public void testNamedFunctionInBlock() throws Exception { public void testNamedFunctionInBlock() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("typeParameter.kt") @TestMetadata("typeParameter.kt")
public void testTypeParameter() throws Exception { public void testTypeParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/typeParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/typeParameter.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -417,36 +417,36 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Local extends AbstractControlFlowTest { public static class Local extends AbstractControlFlowTest {
public void testAllFilesPresentInLocal() throws Exception { public void testAllFilesPresentInLocal() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("localClass.kt") @TestMetadata("localClass.kt")
public void testLocalClass() throws Exception { public void testLocalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("LocalDeclarations.kt") @TestMetadata("LocalDeclarations.kt")
public void testLocalDeclarations() throws Exception { public void testLocalDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/LocalDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/LocalDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunction.kt") @TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception { public void testLocalFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localProperty.kt") @TestMetadata("localProperty.kt")
public void testLocalProperty() throws Exception { public void testLocalProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ObjectExpression.kt") @TestMetadata("ObjectExpression.kt")
public void testObjectExpression() throws Exception { public void testObjectExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/ObjectExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/ObjectExpression.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -456,18 +456,18 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class MultiDeclaration extends AbstractControlFlowTest { public static class MultiDeclaration extends AbstractControlFlowTest {
public void testAllFilesPresentInMultiDeclaration() throws Exception { public void testAllFilesPresentInMultiDeclaration() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("MultiDecl.kt") @TestMetadata("MultiDecl.kt")
public void testMultiDecl() throws Exception { public void testMultiDecl() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("multiDeclarationWithError.kt") @TestMetadata("multiDeclarationWithError.kt")
public void testMultiDeclarationWithError() throws Exception { public void testMultiDeclarationWithError() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -477,18 +477,18 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Properties extends AbstractControlFlowTest { public static class Properties extends AbstractControlFlowTest {
public void testAllFilesPresentInProperties() throws Exception { public void testAllFilesPresentInProperties() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DelegatedProperty.kt") @TestMetadata("DelegatedProperty.kt")
public void testDelegatedProperty() throws Exception { public void testDelegatedProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unreachableDelegation.kt") @TestMetadata("unreachableDelegation.kt")
public void testUnreachableDelegation() throws Exception { public void testUnreachableDelegation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -499,144 +499,144 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Expressions extends AbstractControlFlowTest { public static class Expressions extends AbstractControlFlowTest {
public void testAllFilesPresentInExpressions() throws Exception { public void testAllFilesPresentInExpressions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("assignmentToThis.kt") @TestMetadata("assignmentToThis.kt")
public void testAssignmentToThis() throws Exception { public void testAssignmentToThis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/assignmentToThis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/assignmentToThis.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Assignments.kt") @TestMetadata("Assignments.kt")
public void testAssignments() throws Exception { public void testAssignments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/Assignments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/Assignments.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("callableReferences.kt") @TestMetadata("callableReferences.kt")
public void testCallableReferences() throws Exception { public void testCallableReferences() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/callableReferences.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/callableReferences.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("casts.kt") @TestMetadata("casts.kt")
public void testCasts() throws Exception { public void testCasts() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/casts.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/casts.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("chainedQualifiedExpression.kt") @TestMetadata("chainedQualifiedExpression.kt")
public void testChainedQualifiedExpression() throws Exception { public void testChainedQualifiedExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("expressionAsFunction.kt") @TestMetadata("expressionAsFunction.kt")
public void testExpressionAsFunction() throws Exception { public void testExpressionAsFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/expressionAsFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/expressionAsFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("incdec.kt") @TestMetadata("incdec.kt")
public void testIncdec() throws Exception { public void testIncdec() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/incdec.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/incdec.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invalidVariableCall.kt") @TestMetadata("invalidVariableCall.kt")
public void testInvalidVariableCall() throws Exception { public void testInvalidVariableCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/invalidVariableCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/invalidVariableCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("labeledExpression.kt") @TestMetadata("labeledExpression.kt")
public void testLabeledExpression() throws Exception { public void testLabeledExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("LazyBooleans.kt") @TestMetadata("LazyBooleans.kt")
public void testLazyBooleans() throws Exception { public void testLazyBooleans() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nothingExpr.kt") @TestMetadata("nothingExpr.kt")
public void testNothingExpr() throws Exception { public void testNothingExpr() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/nothingExpr.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/nothingExpr.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parenthesizedSelector.kt") @TestMetadata("parenthesizedSelector.kt")
public void testParenthesizedSelector() throws Exception { public void testParenthesizedSelector() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/parenthesizedSelector.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/parenthesizedSelector.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertySafeCall.kt") @TestMetadata("propertySafeCall.kt")
public void testPropertySafeCall() throws Exception { public void testPropertySafeCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/propertySafeCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/propertySafeCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("qualifiedExpressionWithoutSelector.kt") @TestMetadata("qualifiedExpressionWithoutSelector.kt")
public void testQualifiedExpressionWithoutSelector() throws Exception { public void testQualifiedExpressionWithoutSelector() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ReturnFromExpression.kt") @TestMetadata("ReturnFromExpression.kt")
public void testReturnFromExpression() throws Exception { public void testReturnFromExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/ReturnFromExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/ReturnFromExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisExpression.kt") @TestMetadata("thisExpression.kt")
public void testThisExpression() throws Exception { public void testThisExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/thisExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/thisExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedCall.kt") @TestMetadata("unresolvedCall.kt")
public void testUnresolvedCall() throws Exception { public void testUnresolvedCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedCalls.kt") @TestMetadata("unresolvedCalls.kt")
public void testUnresolvedCalls() throws Exception { public void testUnresolvedCalls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCalls.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCalls.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedCallsWithReceiver.kt") @TestMetadata("unresolvedCallsWithReceiver.kt")
public void testUnresolvedCallsWithReceiver() throws Exception { public void testUnresolvedCallsWithReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedProperty.kt") @TestMetadata("unresolvedProperty.kt")
public void testUnresolvedProperty() throws Exception { public void testUnresolvedProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedWriteLHS.kt") @TestMetadata("unresolvedWriteLHS.kt")
public void testUnresolvedWriteLHS() throws Exception { public void testUnresolvedWriteLHS() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unsupportedReturns.kt") @TestMetadata("unsupportedReturns.kt")
public void testUnsupportedReturns() throws Exception { public void testUnsupportedReturns() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unsupportedReturns.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unsupportedReturns.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unusedExpressionSimpleName.kt") @TestMetadata("unusedExpressionSimpleName.kt")
public void testUnusedExpressionSimpleName() throws Exception { public void testUnusedExpressionSimpleName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -646,18 +646,18 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Functions extends AbstractControlFlowTest { public static class Functions extends AbstractControlFlowTest {
public void testAllFilesPresentInFunctions() throws Exception { public void testAllFilesPresentInFunctions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/functions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/functions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DefaultValuesForArguments.kt") @TestMetadata("DefaultValuesForArguments.kt")
public void testDefaultValuesForArguments() throws Exception { public void testDefaultValuesForArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/functions/DefaultValuesForArguments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/DefaultValuesForArguments.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unmappedArgs.kt") @TestMetadata("unmappedArgs.kt")
public void testUnmappedArgs() throws Exception { public void testUnmappedArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/functions/unmappedArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/unmappedArgs.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -667,36 +667,36 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class SecondaryConstructors extends AbstractControlFlowTest { public static class SecondaryConstructors extends AbstractControlFlowTest {
public void testAllFilesPresentInSecondaryConstructors() throws Exception { public void testAllFilesPresentInSecondaryConstructors() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("withPrimary.kt") @TestMetadata("withPrimary.kt")
public void testWithPrimary() throws Exception { public void testWithPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withPrimarySuper.kt") @TestMetadata("withPrimarySuper.kt")
public void testWithPrimarySuper() throws Exception { public void testWithPrimarySuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withReturn.kt") @TestMetadata("withReturn.kt")
public void testWithReturn() throws Exception { public void testWithReturn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withReturn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withoutPrimary.kt") @TestMetadata("withoutPrimary.kt")
public void testWithoutPrimary() throws Exception { public void testWithoutPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withoutPrimarySuper.kt") @TestMetadata("withoutPrimarySuper.kt")
public void testWithoutPrimarySuper() throws Exception { public void testWithoutPrimarySuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -706,36 +706,36 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class TailCalls extends AbstractControlFlowTest { public static class TailCalls extends AbstractControlFlowTest {
public void testAllFilesPresentInTailCalls() throws Exception { public void testAllFilesPresentInTailCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/tailCalls"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/tailCalls"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("finally.kt") @TestMetadata("finally.kt")
public void testFinally() throws Exception { public void testFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finally.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("finallyWithReturn.kt") @TestMetadata("finallyWithReturn.kt")
public void testFinallyWithReturn() throws Exception { public void testFinallyWithReturn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finallyWithReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finallyWithReturn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("sum.kt") @TestMetadata("sum.kt")
public void testSum() throws Exception { public void testSum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/sum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/sum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("try.kt") @TestMetadata("try.kt")
public void testTry() throws Exception { public void testTry() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/try.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/try.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tryCatchFinally.kt") @TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception { public void testTryCatchFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/tryCatchFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/tryCatchFinally.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.cfg;
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,7 +32,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class DataFlowTestGenerated extends AbstractDataFlowTest { public class DataFlowTestGenerated extends AbstractDataFlowTest {
public void testAllFilesPresentInCfg_variables() throws Exception { public void testAllFilesPresentInCfg_variables() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/cfg-variables/basic") @TestMetadata("compiler/testData/cfg-variables/basic")
@@ -40,36 +40,36 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Basic extends AbstractDataFlowTest { public static class Basic extends AbstractDataFlowTest {
public void testAllFilesPresentInBasic() throws Exception { public void testAllFilesPresentInBasic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/basic"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/basic"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("IfWithUninitialized.kt") @TestMetadata("IfWithUninitialized.kt")
public void testIfWithUninitialized() throws Exception { public void testIfWithUninitialized() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InitializedNotDeclared.kt") @TestMetadata("InitializedNotDeclared.kt")
public void testInitializedNotDeclared() throws Exception { public void testInitializedNotDeclared() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("UsageInFunctionLiteral.kt") @TestMetadata("UsageInFunctionLiteral.kt")
public void testUsageInFunctionLiteral() throws Exception { public void testUsageInFunctionLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VariablesInitialization.kt") @TestMetadata("VariablesInitialization.kt")
public void testVariablesInitialization() throws Exception { public void testVariablesInitialization() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesInitialization.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesInitialization.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VariablesUsage.kt") @TestMetadata("VariablesUsage.kt")
public void testVariablesUsage() throws Exception { public void testVariablesUsage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesUsage.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesUsage.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -79,24 +79,24 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Bugs extends AbstractDataFlowTest { public static class Bugs extends AbstractDataFlowTest {
public void testAllFilesPresentInBugs() throws Exception { public void testAllFilesPresentInBugs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/bugs"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/bugs"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("referenceToPropertyInitializer.kt") @TestMetadata("referenceToPropertyInitializer.kt")
public void testReferenceToPropertyInitializer() throws Exception { public void testReferenceToPropertyInitializer() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varInitializationInIf.kt") @TestMetadata("varInitializationInIf.kt")
public void testVarInitializationInIf() throws Exception { public void testVarInitializationInIf() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varInitializationInIfInCycle.kt") @TestMetadata("varInitializationInIfInCycle.kt")
public void testVarInitializationInIfInCycle() throws Exception { public void testVarInitializationInIfInCycle() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -106,78 +106,78 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class LexicalScopes extends AbstractDataFlowTest { public static class LexicalScopes extends AbstractDataFlowTest {
public void testAllFilesPresentInLexicalScopes() throws Exception { public void testAllFilesPresentInLexicalScopes() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("doWhileScope.kt") @TestMetadata("doWhileScope.kt")
public void testDoWhileScope() throws Exception { public void testDoWhileScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("forScope.kt") @TestMetadata("forScope.kt")
public void testForScope() throws Exception { public void testForScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/forScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/forScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionLiteralScope.kt") @TestMetadata("functionLiteralScope.kt")
public void testFunctionLiteralScope() throws Exception { public void testFunctionLiteralScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ifScope.kt") @TestMetadata("ifScope.kt")
public void testIfScope() throws Exception { public void testIfScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localClass.kt") @TestMetadata("localClass.kt")
public void testLocalClass() throws Exception { public void testLocalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunctionScope.kt") @TestMetadata("localFunctionScope.kt")
public void testLocalFunctionScope() throws Exception { public void testLocalFunctionScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunctionScopeWithoutBody.kt") @TestMetadata("localFunctionScopeWithoutBody.kt")
public void testLocalFunctionScopeWithoutBody() throws Exception { public void testLocalFunctionScopeWithoutBody() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localObject.kt") @TestMetadata("localObject.kt")
public void testLocalObject() throws Exception { public void testLocalObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("objectLiteralScope.kt") @TestMetadata("objectLiteralScope.kt")
public void testObjectLiteralScope() throws Exception { public void testObjectLiteralScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyAccessorScope.kt") @TestMetadata("propertyAccessorScope.kt")
public void testPropertyAccessorScope() throws Exception { public void testPropertyAccessorScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tryScope.kt") @TestMetadata("tryScope.kt")
public void testTryScope() throws Exception { public void testTryScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whileScope.kt") @TestMetadata("whileScope.kt")
public void testWhileScope() throws Exception { public void testWhileScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.cfg;
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,7 +34,7 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Cfg extends AbstractPseudoValueTest { public static class Cfg extends AbstractPseudoValueTest {
public void testAllFilesPresentInCfg() throws Exception { public void testAllFilesPresentInCfg() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/cfg/arrays") @TestMetadata("compiler/testData/cfg/arrays")
@@ -42,66 +42,66 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Arrays extends AbstractPseudoValueTest { public static class Arrays extends AbstractPseudoValueTest {
public void testAllFilesPresentInArrays() throws Exception { public void testAllFilesPresentInArrays() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ArrayAccess.kt") @TestMetadata("ArrayAccess.kt")
public void testArrayAccess() throws Exception { public void testArrayAccess() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayAccess.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayAccess.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arrayAccessExpression.kt") @TestMetadata("arrayAccessExpression.kt")
public void testArrayAccessExpression() throws Exception { public void testArrayAccessExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayAccessExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayAccessExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arrayInc.kt") @TestMetadata("arrayInc.kt")
public void testArrayInc() throws Exception { public void testArrayInc() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayInc.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayInc.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arrayIncUnresolved.kt") @TestMetadata("arrayIncUnresolved.kt")
public void testArrayIncUnresolved() throws Exception { public void testArrayIncUnresolved() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayIncUnresolved.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayIncUnresolved.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ArrayOfFunctions.kt") @TestMetadata("ArrayOfFunctions.kt")
public void testArrayOfFunctions() throws Exception { public void testArrayOfFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayOfFunctions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayOfFunctions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySet.kt") @TestMetadata("arraySet.kt")
public void testArraySet() throws Exception { public void testArraySet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetNoRHS.kt") @TestMetadata("arraySetNoRHS.kt")
public void testArraySetNoRHS() throws Exception { public void testArraySetNoRHS() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetNoRHS.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetNoRHS.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetPlusAssign.kt") @TestMetadata("arraySetPlusAssign.kt")
public void testArraySetPlusAssign() throws Exception { public void testArraySetPlusAssign() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssign.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssign.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetPlusAssignUnresolved.kt") @TestMetadata("arraySetPlusAssignUnresolved.kt")
public void testArraySetPlusAssignUnresolved() throws Exception { public void testArraySetPlusAssignUnresolved() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("arraySetUnresolved.kt") @TestMetadata("arraySetUnresolved.kt")
public void testArraySetUnresolved() throws Exception { public void testArraySetUnresolved() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetUnresolved.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetUnresolved.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -111,24 +111,24 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Basic extends AbstractPseudoValueTest { public static class Basic extends AbstractPseudoValueTest {
public void testAllFilesPresentInBasic() throws Exception { public void testAllFilesPresentInBasic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Basic.kt") @TestMetadata("Basic.kt")
public void testBasic() throws Exception { public void testBasic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/basic/Basic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/Basic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("EmptyFunction.kt") @TestMetadata("EmptyFunction.kt")
public void testEmptyFunction() throws Exception { public void testEmptyFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/basic/EmptyFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/EmptyFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ShortFunction.kt") @TestMetadata("ShortFunction.kt")
public void testShortFunction() throws Exception { public void testShortFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/basic/ShortFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/ShortFunction.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -138,18 +138,18 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Bugs extends AbstractPseudoValueTest { public static class Bugs extends AbstractPseudoValueTest {
public void testAllFilesPresentInBugs() throws Exception { public void testAllFilesPresentInBugs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("jumpToOuterScope.kt") @TestMetadata("jumpToOuterScope.kt")
public void testJumpToOuterScope() throws Exception { public void testJumpToOuterScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/bugs/jumpToOuterScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/jumpToOuterScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt7761.kt") @TestMetadata("kt7761.kt")
public void testKt7761() throws Exception { public void testKt7761() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt7761.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt7761.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -159,78 +159,78 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ControlStructures extends AbstractPseudoValueTest { public static class ControlStructures extends AbstractPseudoValueTest {
public void testAllFilesPresentInControlStructures() throws Exception { public void testAllFilesPresentInControlStructures() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("continueInDoWhile.kt") @TestMetadata("continueInDoWhile.kt")
public void testContinueInDoWhile() throws Exception { public void testContinueInDoWhile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInDoWhile.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInDoWhile.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("continueInFor.kt") @TestMetadata("continueInFor.kt")
public void testContinueInFor() throws Exception { public void testContinueInFor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInFor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInFor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("continueInWhile.kt") @TestMetadata("continueInWhile.kt")
public void testContinueInWhile() throws Exception { public void testContinueInWhile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInWhile.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInWhile.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Finally.kt") @TestMetadata("Finally.kt")
public void testFinally() throws Exception { public void testFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/Finally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/Finally.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FinallyTestCopy.kt") @TestMetadata("FinallyTestCopy.kt")
public void testFinallyTestCopy() throws Exception { public void testFinallyTestCopy() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("For.kt") @TestMetadata("For.kt")
public void testFor() throws Exception { public void testFor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/For.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/For.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("If.kt") @TestMetadata("If.kt")
public void testIf() throws Exception { public void testIf() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/If.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/If.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localAndNonlocalReturnsWithFinally.kt") @TestMetadata("localAndNonlocalReturnsWithFinally.kt")
public void testLocalAndNonlocalReturnsWithFinally() throws Exception { public void testLocalAndNonlocalReturnsWithFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OnlyWhileInFunctionBody.kt") @TestMetadata("OnlyWhileInFunctionBody.kt")
public void testOnlyWhileInFunctionBody() throws Exception { public void testOnlyWhileInFunctionBody() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("returnsInWhen.kt") @TestMetadata("returnsInWhen.kt")
public void testReturnsInWhen() throws Exception { public void testReturnsInWhen() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/returnsInWhen.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/returnsInWhen.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whenConditions.kt") @TestMetadata("whenConditions.kt")
public void testWhenConditions() throws Exception { public void testWhenConditions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenConditions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenConditions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whenExhaustive.kt") @TestMetadata("whenExhaustive.kt")
public void testWhenExhaustive() throws Exception { public void testWhenExhaustive() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenExhaustive.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenExhaustive.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -240,60 +240,60 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Conventions extends AbstractPseudoValueTest { public static class Conventions extends AbstractPseudoValueTest {
public void testAllFilesPresentInConventions() throws Exception { public void testAllFilesPresentInConventions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("bothReceivers.kt") @TestMetadata("bothReceivers.kt")
public void testBothReceivers() throws Exception { public void testBothReceivers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/bothReceivers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/bothReceivers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("complexAssignmentWithGetSetViaVar.kt") @TestMetadata("complexAssignmentWithGetSetViaVar.kt")
public void testComplexAssignmentWithGetSetViaVar() throws Exception { public void testComplexAssignmentWithGetSetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithGetSetViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithGetSetViaVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("complexAssignmentWithSetViaVar.kt") @TestMetadata("complexAssignmentWithSetViaVar.kt")
public void testComplexAssignmentWithSetViaVar() throws Exception { public void testComplexAssignmentWithSetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithSetViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithSetViaVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("equals.kt") @TestMetadata("equals.kt")
public void testEquals() throws Exception { public void testEquals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("getViaVar.kt") @TestMetadata("getViaVar.kt")
public void testGetViaVar() throws Exception { public void testGetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/getViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/getViaVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("incrementAtTheEnd.kt") @TestMetadata("incrementAtTheEnd.kt")
public void testIncrementAtTheEnd() throws Exception { public void testIncrementAtTheEnd() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invoke.kt") @TestMetadata("invoke.kt")
public void testInvoke() throws Exception { public void testInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/invoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/invoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("notEqual.kt") @TestMetadata("notEqual.kt")
public void testNotEqual() throws Exception { public void testNotEqual() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("setViaVar.kt") @TestMetadata("setViaVar.kt")
public void testSetViaVar() throws Exception { public void testSetViaVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/conventions/setViaVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/setViaVar.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -303,24 +303,24 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DeadCode extends AbstractPseudoValueTest { public static class DeadCode extends AbstractPseudoValueTest {
public void testAllFilesPresentInDeadCode() throws Exception { public void testAllFilesPresentInDeadCode() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/deadCode"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/deadCode"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DeadCode.kt") @TestMetadata("DeadCode.kt")
public void testDeadCode() throws Exception { public void testDeadCode() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/DeadCode.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/DeadCode.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("returnInElvis.kt") @TestMetadata("returnInElvis.kt")
public void testReturnInElvis() throws Exception { public void testReturnInElvis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/returnInElvis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/returnInElvis.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("stringTemplate.kt") @TestMetadata("stringTemplate.kt")
public void testStringTemplate() throws Exception { public void testStringTemplate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/stringTemplate.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/stringTemplate.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -330,7 +330,7 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Declarations extends AbstractPseudoValueTest { public static class Declarations extends AbstractPseudoValueTest {
public void testAllFilesPresentInDeclarations() throws Exception { public void testAllFilesPresentInDeclarations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/cfg/declarations/classesAndObjects") @TestMetadata("compiler/testData/cfg/declarations/classesAndObjects")
@@ -338,24 +338,24 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassesAndObjects extends AbstractPseudoValueTest { public static class ClassesAndObjects extends AbstractPseudoValueTest {
public void testAllFilesPresentInClassesAndObjects() throws Exception { public void testAllFilesPresentInClassesAndObjects() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("AnonymousInitializers.kt") @TestMetadata("AnonymousInitializers.kt")
public void testAnonymousInitializers() throws Exception { public void testAnonymousInitializers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationByExpression.kt") @TestMetadata("delegationByExpression.kt")
public void testDelegationByExpression() throws Exception { public void testDelegationByExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationBySuperCall.kt") @TestMetadata("delegationBySuperCall.kt")
public void testDelegationBySuperCall() throws Exception { public void testDelegationBySuperCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -365,12 +365,12 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class FunctionLiterals extends AbstractPseudoValueTest { public static class FunctionLiterals extends AbstractPseudoValueTest {
public void testAllFilesPresentInFunctionLiterals() throws Exception { public void testAllFilesPresentInFunctionLiterals() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("unusedFunctionLiteral.kt") @TestMetadata("unusedFunctionLiteral.kt")
public void testUnusedFunctionLiteral() throws Exception { public void testUnusedFunctionLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -380,36 +380,36 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Functions extends AbstractPseudoValueTest { public static class Functions extends AbstractPseudoValueTest {
public void testAllFilesPresentInFunctions() throws Exception { public void testAllFilesPresentInFunctions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("anonymousFunctionInBlock.kt") @TestMetadata("anonymousFunctionInBlock.kt")
public void testAnonymousFunctionInBlock() throws Exception { public void testAnonymousFunctionInBlock() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FailFunction.kt") @TestMetadata("FailFunction.kt")
public void testFailFunction() throws Exception { public void testFailFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/FailFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/FailFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionAsExpression.kt") @TestMetadata("functionAsExpression.kt")
public void testFunctionAsExpression() throws Exception { public void testFunctionAsExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/functionAsExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/functionAsExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("namedFunctionInBlock.kt") @TestMetadata("namedFunctionInBlock.kt")
public void testNamedFunctionInBlock() throws Exception { public void testNamedFunctionInBlock() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("typeParameter.kt") @TestMetadata("typeParameter.kt")
public void testTypeParameter() throws Exception { public void testTypeParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/typeParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/typeParameter.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -419,36 +419,36 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Local extends AbstractPseudoValueTest { public static class Local extends AbstractPseudoValueTest {
public void testAllFilesPresentInLocal() throws Exception { public void testAllFilesPresentInLocal() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("localClass.kt") @TestMetadata("localClass.kt")
public void testLocalClass() throws Exception { public void testLocalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("LocalDeclarations.kt") @TestMetadata("LocalDeclarations.kt")
public void testLocalDeclarations() throws Exception { public void testLocalDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/LocalDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/LocalDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunction.kt") @TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception { public void testLocalFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localProperty.kt") @TestMetadata("localProperty.kt")
public void testLocalProperty() throws Exception { public void testLocalProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ObjectExpression.kt") @TestMetadata("ObjectExpression.kt")
public void testObjectExpression() throws Exception { public void testObjectExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/ObjectExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/ObjectExpression.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -458,18 +458,18 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class MultiDeclaration extends AbstractPseudoValueTest { public static class MultiDeclaration extends AbstractPseudoValueTest {
public void testAllFilesPresentInMultiDeclaration() throws Exception { public void testAllFilesPresentInMultiDeclaration() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("MultiDecl.kt") @TestMetadata("MultiDecl.kt")
public void testMultiDecl() throws Exception { public void testMultiDecl() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("multiDeclarationWithError.kt") @TestMetadata("multiDeclarationWithError.kt")
public void testMultiDeclarationWithError() throws Exception { public void testMultiDeclarationWithError() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -479,18 +479,18 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Properties extends AbstractPseudoValueTest { public static class Properties extends AbstractPseudoValueTest {
public void testAllFilesPresentInProperties() throws Exception { public void testAllFilesPresentInProperties() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DelegatedProperty.kt") @TestMetadata("DelegatedProperty.kt")
public void testDelegatedProperty() throws Exception { public void testDelegatedProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unreachableDelegation.kt") @TestMetadata("unreachableDelegation.kt")
public void testUnreachableDelegation() throws Exception { public void testUnreachableDelegation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -501,144 +501,144 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Expressions extends AbstractPseudoValueTest { public static class Expressions extends AbstractPseudoValueTest {
public void testAllFilesPresentInExpressions() throws Exception { public void testAllFilesPresentInExpressions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("assignmentToThis.kt") @TestMetadata("assignmentToThis.kt")
public void testAssignmentToThis() throws Exception { public void testAssignmentToThis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/assignmentToThis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/assignmentToThis.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Assignments.kt") @TestMetadata("Assignments.kt")
public void testAssignments() throws Exception { public void testAssignments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/Assignments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/Assignments.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("callableReferences.kt") @TestMetadata("callableReferences.kt")
public void testCallableReferences() throws Exception { public void testCallableReferences() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/callableReferences.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/callableReferences.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("casts.kt") @TestMetadata("casts.kt")
public void testCasts() throws Exception { public void testCasts() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/casts.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/casts.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("chainedQualifiedExpression.kt") @TestMetadata("chainedQualifiedExpression.kt")
public void testChainedQualifiedExpression() throws Exception { public void testChainedQualifiedExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("expressionAsFunction.kt") @TestMetadata("expressionAsFunction.kt")
public void testExpressionAsFunction() throws Exception { public void testExpressionAsFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/expressionAsFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/expressionAsFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("incdec.kt") @TestMetadata("incdec.kt")
public void testIncdec() throws Exception { public void testIncdec() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/incdec.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/incdec.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invalidVariableCall.kt") @TestMetadata("invalidVariableCall.kt")
public void testInvalidVariableCall() throws Exception { public void testInvalidVariableCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/invalidVariableCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/invalidVariableCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("labeledExpression.kt") @TestMetadata("labeledExpression.kt")
public void testLabeledExpression() throws Exception { public void testLabeledExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("LazyBooleans.kt") @TestMetadata("LazyBooleans.kt")
public void testLazyBooleans() throws Exception { public void testLazyBooleans() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nothingExpr.kt") @TestMetadata("nothingExpr.kt")
public void testNothingExpr() throws Exception { public void testNothingExpr() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/nothingExpr.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/nothingExpr.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parenthesizedSelector.kt") @TestMetadata("parenthesizedSelector.kt")
public void testParenthesizedSelector() throws Exception { public void testParenthesizedSelector() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/parenthesizedSelector.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/parenthesizedSelector.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertySafeCall.kt") @TestMetadata("propertySafeCall.kt")
public void testPropertySafeCall() throws Exception { public void testPropertySafeCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/propertySafeCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/propertySafeCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("qualifiedExpressionWithoutSelector.kt") @TestMetadata("qualifiedExpressionWithoutSelector.kt")
public void testQualifiedExpressionWithoutSelector() throws Exception { public void testQualifiedExpressionWithoutSelector() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ReturnFromExpression.kt") @TestMetadata("ReturnFromExpression.kt")
public void testReturnFromExpression() throws Exception { public void testReturnFromExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/ReturnFromExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/ReturnFromExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisExpression.kt") @TestMetadata("thisExpression.kt")
public void testThisExpression() throws Exception { public void testThisExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/thisExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/thisExpression.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedCall.kt") @TestMetadata("unresolvedCall.kt")
public void testUnresolvedCall() throws Exception { public void testUnresolvedCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedCalls.kt") @TestMetadata("unresolvedCalls.kt")
public void testUnresolvedCalls() throws Exception { public void testUnresolvedCalls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCalls.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCalls.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedCallsWithReceiver.kt") @TestMetadata("unresolvedCallsWithReceiver.kt")
public void testUnresolvedCallsWithReceiver() throws Exception { public void testUnresolvedCallsWithReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedProperty.kt") @TestMetadata("unresolvedProperty.kt")
public void testUnresolvedProperty() throws Exception { public void testUnresolvedProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unresolvedWriteLHS.kt") @TestMetadata("unresolvedWriteLHS.kt")
public void testUnresolvedWriteLHS() throws Exception { public void testUnresolvedWriteLHS() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unsupportedReturns.kt") @TestMetadata("unsupportedReturns.kt")
public void testUnsupportedReturns() throws Exception { public void testUnsupportedReturns() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unsupportedReturns.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unsupportedReturns.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unusedExpressionSimpleName.kt") @TestMetadata("unusedExpressionSimpleName.kt")
public void testUnusedExpressionSimpleName() throws Exception { public void testUnusedExpressionSimpleName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -648,18 +648,18 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Functions extends AbstractPseudoValueTest { public static class Functions extends AbstractPseudoValueTest {
public void testAllFilesPresentInFunctions() throws Exception { public void testAllFilesPresentInFunctions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/functions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/functions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DefaultValuesForArguments.kt") @TestMetadata("DefaultValuesForArguments.kt")
public void testDefaultValuesForArguments() throws Exception { public void testDefaultValuesForArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/functions/DefaultValuesForArguments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/DefaultValuesForArguments.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unmappedArgs.kt") @TestMetadata("unmappedArgs.kt")
public void testUnmappedArgs() throws Exception { public void testUnmappedArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/functions/unmappedArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/unmappedArgs.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -669,36 +669,36 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class SecondaryConstructors extends AbstractPseudoValueTest { public static class SecondaryConstructors extends AbstractPseudoValueTest {
public void testAllFilesPresentInSecondaryConstructors() throws Exception { public void testAllFilesPresentInSecondaryConstructors() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("withPrimary.kt") @TestMetadata("withPrimary.kt")
public void testWithPrimary() throws Exception { public void testWithPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withPrimarySuper.kt") @TestMetadata("withPrimarySuper.kt")
public void testWithPrimarySuper() throws Exception { public void testWithPrimarySuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withReturn.kt") @TestMetadata("withReturn.kt")
public void testWithReturn() throws Exception { public void testWithReturn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withReturn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withoutPrimary.kt") @TestMetadata("withoutPrimary.kt")
public void testWithoutPrimary() throws Exception { public void testWithoutPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withoutPrimarySuper.kt") @TestMetadata("withoutPrimarySuper.kt")
public void testWithoutPrimarySuper() throws Exception { public void testWithoutPrimarySuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -708,36 +708,36 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class TailCalls extends AbstractPseudoValueTest { public static class TailCalls extends AbstractPseudoValueTest {
public void testAllFilesPresentInTailCalls() throws Exception { public void testAllFilesPresentInTailCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/tailCalls"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/tailCalls"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("finally.kt") @TestMetadata("finally.kt")
public void testFinally() throws Exception { public void testFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finally.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("finallyWithReturn.kt") @TestMetadata("finallyWithReturn.kt")
public void testFinallyWithReturn() throws Exception { public void testFinallyWithReturn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finallyWithReturn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finallyWithReturn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("sum.kt") @TestMetadata("sum.kt")
public void testSum() throws Exception { public void testSum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/sum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/sum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("try.kt") @TestMetadata("try.kt")
public void testTry() throws Exception { public void testTry() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/try.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/try.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tryCatchFinally.kt") @TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception { public void testTryCatchFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/tryCatchFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/tryCatchFinally.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -748,7 +748,7 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Cfg_variables extends AbstractPseudoValueTest { public static class Cfg_variables extends AbstractPseudoValueTest {
public void testAllFilesPresentInCfg_variables() throws Exception { public void testAllFilesPresentInCfg_variables() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/cfg-variables/basic") @TestMetadata("compiler/testData/cfg-variables/basic")
@@ -756,36 +756,36 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Basic extends AbstractPseudoValueTest { public static class Basic extends AbstractPseudoValueTest {
public void testAllFilesPresentInBasic() throws Exception { public void testAllFilesPresentInBasic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/basic"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/basic"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("IfWithUninitialized.kt") @TestMetadata("IfWithUninitialized.kt")
public void testIfWithUninitialized() throws Exception { public void testIfWithUninitialized() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InitializedNotDeclared.kt") @TestMetadata("InitializedNotDeclared.kt")
public void testInitializedNotDeclared() throws Exception { public void testInitializedNotDeclared() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("UsageInFunctionLiteral.kt") @TestMetadata("UsageInFunctionLiteral.kt")
public void testUsageInFunctionLiteral() throws Exception { public void testUsageInFunctionLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VariablesInitialization.kt") @TestMetadata("VariablesInitialization.kt")
public void testVariablesInitialization() throws Exception { public void testVariablesInitialization() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesInitialization.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesInitialization.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VariablesUsage.kt") @TestMetadata("VariablesUsage.kt")
public void testVariablesUsage() throws Exception { public void testVariablesUsage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesUsage.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesUsage.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -795,24 +795,24 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Bugs extends AbstractPseudoValueTest { public static class Bugs extends AbstractPseudoValueTest {
public void testAllFilesPresentInBugs() throws Exception { public void testAllFilesPresentInBugs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/bugs"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/bugs"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("referenceToPropertyInitializer.kt") @TestMetadata("referenceToPropertyInitializer.kt")
public void testReferenceToPropertyInitializer() throws Exception { public void testReferenceToPropertyInitializer() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varInitializationInIf.kt") @TestMetadata("varInitializationInIf.kt")
public void testVarInitializationInIf() throws Exception { public void testVarInitializationInIf() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varInitializationInIfInCycle.kt") @TestMetadata("varInitializationInIfInCycle.kt")
public void testVarInitializationInIfInCycle() throws Exception { public void testVarInitializationInIfInCycle() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -822,78 +822,78 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class LexicalScopes extends AbstractPseudoValueTest { public static class LexicalScopes extends AbstractPseudoValueTest {
public void testAllFilesPresentInLexicalScopes() throws Exception { public void testAllFilesPresentInLexicalScopes() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("doWhileScope.kt") @TestMetadata("doWhileScope.kt")
public void testDoWhileScope() throws Exception { public void testDoWhileScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("forScope.kt") @TestMetadata("forScope.kt")
public void testForScope() throws Exception { public void testForScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/forScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/forScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionLiteralScope.kt") @TestMetadata("functionLiteralScope.kt")
public void testFunctionLiteralScope() throws Exception { public void testFunctionLiteralScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ifScope.kt") @TestMetadata("ifScope.kt")
public void testIfScope() throws Exception { public void testIfScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localClass.kt") @TestMetadata("localClass.kt")
public void testLocalClass() throws Exception { public void testLocalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunctionScope.kt") @TestMetadata("localFunctionScope.kt")
public void testLocalFunctionScope() throws Exception { public void testLocalFunctionScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunctionScopeWithoutBody.kt") @TestMetadata("localFunctionScopeWithoutBody.kt")
public void testLocalFunctionScopeWithoutBody() throws Exception { public void testLocalFunctionScopeWithoutBody() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localObject.kt") @TestMetadata("localObject.kt")
public void testLocalObject() throws Exception { public void testLocalObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("objectLiteralScope.kt") @TestMetadata("objectLiteralScope.kt")
public void testObjectLiteralScope() throws Exception { public void testObjectLiteralScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyAccessorScope.kt") @TestMetadata("propertyAccessorScope.kt")
public void testPropertyAccessorScope() throws Exception { public void testPropertyAccessorScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tryScope.kt") @TestMetadata("tryScope.kt")
public void testTryScope() throws Exception { public void testTryScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("whileScope.kt") @TestMetadata("whileScope.kt")
public void testWhileScope() throws Exception { public void testWhileScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -28,13 +28,13 @@ import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.resolve.BindingContext; import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil; import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetLiteFixture; import org.jetbrains.kotlin.test.KotlinLiteFixture;
import java.io.File; import java.io.File;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
public class CheckerTestUtilTest extends JetLiteFixture { public class CheckerTestUtilTest extends KotlinLiteFixture {
public CheckerTestUtilTest() { public CheckerTestUtilTest() {
super("diagnostics/checkerTestUtil"); super("diagnostics/checkerTestUtil");
@@ -129,7 +129,7 @@ public class CheckerTestUtilTest extends JetLiteFixture {
} }
public void testAbstractJetDiagnosticsTest() throws Exception { public void testAbstractJetDiagnosticsTest() throws Exception {
AbstractJetDiagnosticsTest test = new AbstractJetDiagnosticsTest() { AbstractDiagnosticsTest test = new AbstractDiagnosticsTest() {
{setUp();} {setUp();}
}; };
test.doTest(myFullDataPath + File.separatorChar + "test_with_diagnostic.kt"); test.doTest(myFullDataPath + File.separatorChar + "test_with_diagnostic.kt");
File diff suppressed because it is too large Load Diff
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.checkers;
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;
@@ -30,40 +30,40 @@ import java.util.regex.Pattern;
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class JetDiagnosticsTestWithJsStdLibAndBackendCompilationGenerated extends AbstractJetDiagnosticsTestWithJsStdLibAndBackendCompilation { public class DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated extends AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation {
public void testAllFilesPresentInTestsWithJsStdLibAndBackendCompilation() throws Exception { public void testAllFilesPresentInTestsWithJsStdLibAndBackendCompilation() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Inline extends AbstractJetDiagnosticsTestWithJsStdLibAndBackendCompilation { public static class Inline extends AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation {
public void testAllFilesPresentInInline() throws Exception { public void testAllFilesPresentInInline() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("recursionCycle.kt") @TestMetadata("recursionCycle.kt")
public void testRecursionCycle() throws Exception { public void testRecursionCycle() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycle.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycle.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("recursionCycleLambda.kt") @TestMetadata("recursionCycleLambda.kt")
public void testRecursionCycleLambda() throws Exception { public void testRecursionCycleLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("recursionCycleWithPublicFun.kt") @TestMetadata("recursionCycleWithPublicFun.kt")
public void testRecursionCycleWithPublicFun() throws Exception { public void testRecursionCycleWithPublicFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithPublicFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithPublicFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("recursionCycleWithStdlibCall.kt") @TestMetadata("recursionCycleWithStdlibCall.kt")
public void testRecursionCycleWithStdlibCall() throws Exception { public void testRecursionCycleWithStdlibCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithStdlibCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithStdlibCall.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.checkers;
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;
@@ -30,208 +30,208 @@ import java.util.regex.Pattern;
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnosticsTestWithJsStdLib { public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInTestsWithJsStdLib() throws Exception { public void testAllFilesPresentInTestsWithJsStdLib() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Serializable.kt") @TestMetadata("Serializable.kt")
public void testSerializable() throws Exception { public void testSerializable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/Serializable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/Serializable.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DynamicTypes extends AbstractJetDiagnosticsTestWithJsStdLib { public static class DynamicTypes extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInDynamicTypes() throws Exception { public void testAllFilesPresentInDynamicTypes() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("assignment.kt") @TestMetadata("assignment.kt")
public void testAssignment() throws Exception { public void testAssignment() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/assignment.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/assignment.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("block.kt") @TestMetadata("block.kt")
public void testBlock() throws Exception { public void testBlock() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/block.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/block.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("callableReferences.kt") @TestMetadata("callableReferences.kt")
public void testCallableReferences() throws Exception { public void testCallableReferences() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/callableReferences.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/callableReferences.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("comparisonToNull.kt") @TestMetadata("comparisonToNull.kt")
public void testComparisonToNull() throws Exception { public void testComparisonToNull() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/comparisonToNull.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/comparisonToNull.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("conditions.kt") @TestMetadata("conditions.kt")
public void testConditions() throws Exception { public void testConditions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conditions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conditions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("conventions.kt") @TestMetadata("conventions.kt")
public void testConventions() throws Exception { public void testConventions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationBy.kt") @TestMetadata("delegationBy.kt")
public void testDelegationBy() throws Exception { public void testDelegationBy() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/delegationBy.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/delegationBy.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dynamicCalls.kt") @TestMetadata("dynamicCalls.kt")
public void testDynamicCalls() throws Exception { public void testDynamicCalls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCalls.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCalls.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dynamicCallsWithLambdas.kt") @TestMetadata("dynamicCallsWithLambdas.kt")
public void testDynamicCallsWithLambdas() throws Exception { public void testDynamicCallsWithLambdas() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCallsWithLambdas.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCallsWithLambdas.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dynamicCastTarget.kt") @TestMetadata("dynamicCastTarget.kt")
public void testDynamicCastTarget() throws Exception { public void testDynamicCastTarget() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dynamicSafeCalls.kt") @TestMetadata("dynamicSafeCalls.kt")
public void testDynamicSafeCalls() throws Exception { public void testDynamicSafeCalls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicSafeCalls.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicSafeCalls.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extensionVals.kt") @TestMetadata("extensionVals.kt")
public void testExtensionVals() throws Exception { public void testExtensionVals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVals.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVals.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extensionVars.kt") @TestMetadata("extensionVars.kt")
public void testExtensionVars() throws Exception { public void testExtensionVars() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVars.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVars.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions() throws Exception { public void testExtensions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extensionsToDynamic.kt") @TestMetadata("extensionsToDynamic.kt")
public void testExtensionsToDynamic() throws Exception { public void testExtensionsToDynamic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionsToDynamic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionsToDynamic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitDynamicReceiver.kt") @TestMetadata("implicitDynamicReceiver.kt")
public void testImplicitDynamicReceiver() throws Exception { public void testImplicitDynamicReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/implicitDynamicReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/implicitDynamicReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inference.kt") @TestMetadata("inference.kt")
public void testInference() throws Exception { public void testInference() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("membersOfAny.kt") @TestMetadata("membersOfAny.kt")
public void testMembersOfAny() throws Exception { public void testMembersOfAny() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/membersOfAny.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/membersOfAny.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("namedArguments.kt") @TestMetadata("namedArguments.kt")
public void testNamedArguments() throws Exception { public void testNamedArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/namedArguments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/namedArguments.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noUnsupportedInLocals.kt") @TestMetadata("noUnsupportedInLocals.kt")
public void testNoUnsupportedInLocals() throws Exception { public void testNoUnsupportedInLocals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nullable.kt") @TestMetadata("nullable.kt")
public void testNullable() throws Exception { public void testNullable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/nullable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/nullable.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overloading.kt") @TestMetadata("overloading.kt")
public void testOverloading() throws Exception { public void testOverloading() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloading.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloading.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overloadingAmbiguity.kt") @TestMetadata("overloadingAmbiguity.kt")
public void testOverloadingAmbiguity() throws Exception { public void testOverloadingAmbiguity() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloadingAmbiguity.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloadingAmbiguity.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overrides.kt") @TestMetadata("overrides.kt")
public void testOverrides() throws Exception { public void testOverrides() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("reified.kt") @TestMetadata("reified.kt")
public void testReified() throws Exception { public void testReified() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/reified.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/reified.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("smartCast.kt") @TestMetadata("smartCast.kt")
public void testSmartCast() throws Exception { public void testSmartCast() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/smartCast.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/smartCast.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("spreadOperator.kt") @TestMetadata("spreadOperator.kt")
public void testSpreadOperator() throws Exception { public void testSpreadOperator() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("staticCallsInDynamicContext.kt") @TestMetadata("staticCallsInDynamicContext.kt")
public void testStaticCallsInDynamicContext() throws Exception { public void testStaticCallsInDynamicContext() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/staticCallsInDynamicContext.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/staticCallsInDynamicContext.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("substitution.kt") @TestMetadata("substitution.kt")
public void testSubstitution() throws Exception { public void testSubstitution() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/substitution.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/substitution.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("supertypesAndBounds.kt") @TestMetadata("supertypesAndBounds.kt")
public void testSupertypesAndBounds() throws Exception { public void testSupertypesAndBounds() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varargs.kt") @TestMetadata("varargs.kt")
public void testVarargs() throws Exception { public void testVarargs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/varargs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/varargs.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -239,32 +239,32 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class JsCode extends AbstractJetDiagnosticsTestWithJsStdLib { public static class JsCode extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInJsCode() throws Exception { public void testAllFilesPresentInJsCode() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jsCode"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jsCode"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("argumentIsLiteral.kt") @TestMetadata("argumentIsLiteral.kt")
public void testArgumentIsLiteral() throws Exception { public void testArgumentIsLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("error.kt") @TestMetadata("error.kt")
public void testError() throws Exception { public void testError() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noJavaScriptProduced.kt") @TestMetadata("noJavaScriptProduced.kt")
public void testNoJavaScriptProduced() throws Exception { public void testNoJavaScriptProduced() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("warning.kt") @TestMetadata("warning.kt")
public void testWarning() throws Exception { public void testWarning() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -272,76 +272,76 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Native extends AbstractJetDiagnosticsTestWithJsStdLib { public static class Native extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInNative() throws Exception { public void testAllFilesPresentInNative() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class NativeGetter extends AbstractJetDiagnosticsTestWithJsStdLib { public static class NativeGetter extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInNativeGetter() throws Exception { public void testAllFilesPresentInNativeGetter() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("onLocalExtensionFun.kt") @TestMetadata("onLocalExtensionFun.kt")
public void testOnLocalExtensionFun() throws Exception { public void testOnLocalExtensionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalExtensionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalExtensionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalNativeClassMembers.kt") @TestMetadata("onLocalNativeClassMembers.kt")
public void testOnLocalNativeClassMembers() throws Exception { public void testOnLocalNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalNonNativeClassMembers.kt") @TestMetadata("onLocalNonNativeClassMembers.kt")
public void testOnLocalNonNativeClassMembers() throws Exception { public void testOnLocalNonNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalOtherDeclarations.kt") @TestMetadata("onLocalOtherDeclarations.kt")
public void testOnLocalOtherDeclarations() throws Exception { public void testOnLocalOtherDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNativeClassMembers.kt") @TestMetadata("onNativeClassMembers.kt")
public void testOnNativeClassMembers() throws Exception { public void testOnNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNestedDeclarationsInsideNativeClass.kt") @TestMetadata("onNestedDeclarationsInsideNativeClass.kt")
public void testOnNestedDeclarationsInsideNativeClass() throws Exception { public void testOnNestedDeclarationsInsideNativeClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt") @TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt")
public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception { public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNonNativeClassMembers.kt") @TestMetadata("onNonNativeClassMembers.kt")
public void testOnNonNativeClassMembers() throws Exception { public void testOnNonNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onToplevelExtensionFun.kt") @TestMetadata("onToplevelExtensionFun.kt")
public void testOnToplevelExtensionFun() throws Exception { public void testOnToplevelExtensionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelExtensionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelExtensionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onToplevelOtherDeclarations.kt") @TestMetadata("onToplevelOtherDeclarations.kt")
public void testOnToplevelOtherDeclarations() throws Exception { public void testOnToplevelOtherDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelOtherDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelOtherDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -349,68 +349,68 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class NativeInvoke extends AbstractJetDiagnosticsTestWithJsStdLib { public static class NativeInvoke extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInNativeInvoke() throws Exception { public void testAllFilesPresentInNativeInvoke() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("onLocalExtensionFun.kt") @TestMetadata("onLocalExtensionFun.kt")
public void testOnLocalExtensionFun() throws Exception { public void testOnLocalExtensionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalExtensionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalExtensionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalNativeClassMembers.kt") @TestMetadata("onLocalNativeClassMembers.kt")
public void testOnLocalNativeClassMembers() throws Exception { public void testOnLocalNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalNonNativeClassMembers.kt") @TestMetadata("onLocalNonNativeClassMembers.kt")
public void testOnLocalNonNativeClassMembers() throws Exception { public void testOnLocalNonNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalOtherDeclarations.kt") @TestMetadata("onLocalOtherDeclarations.kt")
public void testOnLocalOtherDeclarations() throws Exception { public void testOnLocalOtherDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNativeClassMembers.kt") @TestMetadata("onNativeClassMembers.kt")
public void testOnNativeClassMembers() throws Exception { public void testOnNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNestedDeclarationsInsideNativeClass.kt") @TestMetadata("onNestedDeclarationsInsideNativeClass.kt")
public void testOnNestedDeclarationsInsideNativeClass() throws Exception { public void testOnNestedDeclarationsInsideNativeClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt") @TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt")
public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception { public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNonNativeClassMembers.kt") @TestMetadata("onNonNativeClassMembers.kt")
public void testOnNonNativeClassMembers() throws Exception { public void testOnNonNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onToplevelExtensionFun.kt") @TestMetadata("onToplevelExtensionFun.kt")
public void testOnToplevelExtensionFun() throws Exception { public void testOnToplevelExtensionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelExtensionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelExtensionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onToplevelOtherDeclarations.kt") @TestMetadata("onToplevelOtherDeclarations.kt")
public void testOnToplevelOtherDeclarations() throws Exception { public void testOnToplevelOtherDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelOtherDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelOtherDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -418,68 +418,68 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class NativeSetter extends AbstractJetDiagnosticsTestWithJsStdLib { public static class NativeSetter extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInNativeSetter() throws Exception { public void testAllFilesPresentInNativeSetter() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("onLocalExtensionFun.kt") @TestMetadata("onLocalExtensionFun.kt")
public void testOnLocalExtensionFun() throws Exception { public void testOnLocalExtensionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalExtensionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalExtensionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalNativeClassMembers.kt") @TestMetadata("onLocalNativeClassMembers.kt")
public void testOnLocalNativeClassMembers() throws Exception { public void testOnLocalNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalNonNativeClassMembers.kt") @TestMetadata("onLocalNonNativeClassMembers.kt")
public void testOnLocalNonNativeClassMembers() throws Exception { public void testOnLocalNonNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onLocalOtherDeclarations.kt") @TestMetadata("onLocalOtherDeclarations.kt")
public void testOnLocalOtherDeclarations() throws Exception { public void testOnLocalOtherDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNativeClassMembers.kt") @TestMetadata("onNativeClassMembers.kt")
public void testOnNativeClassMembers() throws Exception { public void testOnNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNestedDeclarationsInsideNativeClass.kt") @TestMetadata("onNestedDeclarationsInsideNativeClass.kt")
public void testOnNestedDeclarationsInsideNativeClass() throws Exception { public void testOnNestedDeclarationsInsideNativeClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt") @TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt")
public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception { public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onNonNativeClassMembers.kt") @TestMetadata("onNonNativeClassMembers.kt")
public void testOnNonNativeClassMembers() throws Exception { public void testOnNonNativeClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onToplevelExtensionFun.kt") @TestMetadata("onToplevelExtensionFun.kt")
public void testOnToplevelExtensionFun() throws Exception { public void testOnToplevelExtensionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelExtensionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelExtensionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onToplevelOtherDeclarations.kt") @TestMetadata("onToplevelOtherDeclarations.kt")
public void testOnToplevelOtherDeclarations() throws Exception { public void testOnToplevelOtherDeclarations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelOtherDeclarations.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelOtherDeclarations.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -487,32 +487,32 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class OptionlBody extends AbstractJetDiagnosticsTestWithJsStdLib { public static class OptionlBody extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInOptionlBody() throws Exception { public void testAllFilesPresentInOptionlBody() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("native.kt") @TestMetadata("native.kt")
public void testNative() throws Exception { public void testNative() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nativeGetter.kt") @TestMetadata("nativeGetter.kt")
public void testNativeGetter() throws Exception { public void testNativeGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nativeInvoke.kt") @TestMetadata("nativeInvoke.kt")
public void testNativeInvoke() throws Exception { public void testNativeInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeInvoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nativeSetter.kt") @TestMetadata("nativeSetter.kt")
public void testNativeSetter() throws Exception { public void testNativeSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeSetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeSetter.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -520,32 +520,32 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class UnusedParam extends AbstractJetDiagnosticsTestWithJsStdLib { public static class UnusedParam extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInUnusedParam() throws Exception { public void testAllFilesPresentInUnusedParam() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("native.kt") @TestMetadata("native.kt")
public void testNative() throws Exception { public void testNative() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/native.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/native.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nativeGetter.kt") @TestMetadata("nativeGetter.kt")
public void testNativeGetter() throws Exception { public void testNativeGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeGetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeGetter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nativeInvoke.kt") @TestMetadata("nativeInvoke.kt")
public void testNativeInvoke() throws Exception { public void testNativeInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeInvoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nativeSetter.kt") @TestMetadata("nativeSetter.kt")
public void testNativeSetter() throws Exception { public void testNativeSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeSetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeSetter.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -554,20 +554,20 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures") @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class UnsupportedFeatures extends AbstractJetDiagnosticsTestWithJsStdLib { public static class UnsupportedFeatures extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInUnsupportedFeatures() throws Exception { public void testAllFilesPresentInUnsupportedFeatures() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("localClassifier.kt") @TestMetadata("localClassifier.kt")
public void testLocalClassifier() throws Exception { public void testLocalClassifier() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/localClassifier.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nestedInnerClassifier.kt") @TestMetadata("nestedInnerClassifier.kt")
public void testNestedInnerClassifier() throws Exception { public void testNestedInnerClassifier() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/nestedInnerClassifier.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/unsupportedFeatures/nestedInnerClassifier.kt");
doTest(fileName); doTest(fileName);
} }
} }
File diff suppressed because it is too large Load Diff
@@ -26,8 +26,8 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.config.ContentRootsKt; import org.jetbrains.kotlin.config.ContentRootsKt;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetLiteFixture; import org.jetbrains.kotlin.test.KotlinLiteFixture;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
@@ -39,7 +39,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixture { public abstract class KotlinMultiFileTestWithWithJava<M, F> extends KotlinLiteFixture {
protected class ModuleAndDependencies { protected class ModuleAndDependencies {
final M module; final M module;
final List<String> dependencies; final List<String> dependencies;
@@ -53,7 +53,7 @@ public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixtu
protected static boolean writeSourceFile(@NotNull String fileName, @NotNull String content, @NotNull File targetDir) { protected static boolean writeSourceFile(@NotNull String fileName, @NotNull String content, @NotNull File targetDir) {
try { try {
File sourceFile = new File(targetDir, fileName); File sourceFile = new File(targetDir, fileName);
JetTestUtils.mkdirs(sourceFile.getParentFile()); KotlinTestUtils.mkdirs(sourceFile.getParentFile());
Files.write(content, sourceFile, Charset.forName("utf-8")); Files.write(content, sourceFile, Charset.forName("utf-8"));
return true; return true;
} }
@@ -75,10 +75,10 @@ public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixtu
@NotNull @NotNull
protected CompilerConfiguration createCompilerConfiguration(File javaFilesDir) { protected CompilerConfiguration createCompilerConfiguration(File javaFilesDir) {
return JetTestUtils.compilerConfigurationForTests( return KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, ConfigurationKind.JDK_ONLY,
TestJdkKind.MOCK_JDK, TestJdkKind.MOCK_JDK,
Collections.singletonList(JetTestUtils.getAnnotationsJar()), Collections.singletonList(KotlinTestUtils.getAnnotationsJar()),
Collections.singletonList(javaFilesDir) Collections.singletonList(javaFilesDir)
); );
} }
@@ -100,7 +100,7 @@ public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixtu
protected static File createTmpDir(String dirName) { protected static File createTmpDir(String dirName) {
File dir = new File(FileUtil.getTempDirectory(), dirName); File dir = new File(FileUtil.getTempDirectory(), dirName);
try { try {
JetTestUtils.mkdirs(dir); KotlinTestUtils.mkdirs(dir);
} }
catch (IOException e) { catch (IOException e) {
throw ExceptionUtilsKt.rethrow(e); throw ExceptionUtilsKt.rethrow(e);
@@ -113,12 +113,12 @@ public abstract class KotlinMultiFileTestWithWithJava<M, F> extends JetLiteFixtu
final File javaFilesDir = createJavaFilesDir(); final File javaFilesDir = createJavaFilesDir();
final File kotlinFilesDir = getKotlinSourceRoot(); final File kotlinFilesDir = getKotlinSourceRoot();
String expectedText = JetTestUtils.doLoadFile(file); String expectedText = KotlinTestUtils.doLoadFile(file);
final Map<String, ModuleAndDependencies> modules = new HashMap<String, ModuleAndDependencies>(); final Map<String, ModuleAndDependencies> modules = new HashMap<String, ModuleAndDependencies>();
List<F> testFiles = List<F> testFiles =
JetTestUtils.createTestFiles(file.getName(), expectedText, new JetTestUtils.TestFileFactory<M, F>() { KotlinTestUtils.createTestFiles(file.getName(), expectedText, new KotlinTestUtils.TestFileFactory<M, F>() {
@Override @Override
public F createFile( public F createFile(
@Nullable M module, @Nullable M module,
@@ -21,7 +21,7 @@ import com.intellij.execution.util.ExecUtil;
import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.common.ExitCode; import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir; import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.kotlin.utils.PathUtil; import org.jetbrains.kotlin.utils.PathUtil;
@@ -46,7 +46,7 @@ public abstract class AbstractKotlincExecutableTest extends TestCaseWithTmpdir {
File outFile = new File(argsFilePath.replace(".args", ".out")); File outFile = new File(argsFilePath.replace(".args", ".out"));
try { try {
JetTestUtils.assertEqualsToFile(outFile, normalizedOutput); KotlinTestUtils.assertEqualsToFile(outFile, normalizedOutput);
} }
catch (Exception e) { catch (Exception e) {
System.err.println("exit code " + exitCode); System.err.println("exit code " + exitCode);
@@ -29,7 +29,7 @@ import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.cli.js.K2JSCompiler; import org.jetbrains.kotlin.cli.js.K2JSCompiler;
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler; import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
import org.jetbrains.kotlin.load.java.JvmAbi; import org.jetbrains.kotlin.load.java.JvmAbi;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.Tmpdir; import org.jetbrains.kotlin.test.Tmpdir;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
import org.junit.Rule; import org.junit.Rule;
@@ -95,7 +95,7 @@ public class CliBaseTest {
tmpdir.getTmpDir().getPath())); tmpdir.getTmpDir().getPath()));
String actual = getNormalizedCompilerOutput(outputAndExitCode.first, outputAndExitCode.second, testDataDir); String actual = getNormalizedCompilerOutput(outputAndExitCode.first, outputAndExitCode.second, testDataDir);
JetTestUtils.assertEqualsToFile(new File(testDataDir + "/" + testName.getMethodName() + ".out"), actual); KotlinTestUtils.assertEqualsToFile(new File(testDataDir + "/" + testName.getMethodName() + ".out"), actual);
} }
@NotNull @NotNull
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.cli;
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,228 +34,228 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Jvm extends AbstractKotlincExecutableTest { public static class Jvm extends AbstractKotlincExecutableTest {
public void testAllFilesPresentInJvm() throws Exception { public void testAllFilesPresentInJvm() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/jvm"), Pattern.compile("^(.+)\\.args$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/jvm"), Pattern.compile("^(.+)\\.args$"), false);
} }
@TestMetadata("classAndFileClassClash.args") @TestMetadata("classAndFileClassClash.args")
public void testClassAndFileClassClash() throws Exception { public void testClassAndFileClassClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndFileClassClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndFileClassClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("classAndOtherFileClassClash.args") @TestMetadata("classAndOtherFileClassClash.args")
public void testClassAndOtherFileClassClash() throws Exception { public void testClassAndOtherFileClassClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndOtherFileClassClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndOtherFileClassClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("classAndPartClash.args") @TestMetadata("classAndPartClash.args")
public void testClassAndPartClash() throws Exception { public void testClassAndPartClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndPartClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndPartClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("classAndTraitClash.args") @TestMetadata("classAndTraitClash.args")
public void testClassAndTraitClash() throws Exception { public void testClassAndTraitClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndTraitClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndTraitClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("classpath.args") @TestMetadata("classpath.args")
public void testClasspath() throws Exception { public void testClasspath() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/classpath.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classpath.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("conflictingOverloads.args") @TestMetadata("conflictingOverloads.args")
public void testConflictingOverloads() throws Exception { public void testConflictingOverloads() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/conflictingOverloads.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/conflictingOverloads.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("diagnosticsOrder.args") @TestMetadata("diagnosticsOrder.args")
public void testDiagnosticsOrder() throws Exception { public void testDiagnosticsOrder() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/diagnosticsOrder.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/diagnosticsOrder.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("duplicateSources.args") @TestMetadata("duplicateSources.args")
public void testDuplicateSources() throws Exception { public void testDuplicateSources() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/duplicateSources.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/duplicateSources.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("duplicateSourcesInModule.args") @TestMetadata("duplicateSourcesInModule.args")
public void testDuplicateSourcesInModule() throws Exception { public void testDuplicateSourcesInModule() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/duplicateSourcesInModule.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/duplicateSourcesInModule.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("emptySources.args") @TestMetadata("emptySources.args")
public void testEmptySources() throws Exception { public void testEmptySources() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/emptySources.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/emptySources.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("extraHelp.args") @TestMetadata("extraHelp.args")
public void testExtraHelp() throws Exception { public void testExtraHelp() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/extraHelp.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/extraHelp.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("fileClassAndMultifileClassClash.args") @TestMetadata("fileClassAndMultifileClassClash.args")
public void testFileClassAndMultifileClassClash() throws Exception { public void testFileClassAndMultifileClassClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassAndMultifileClassClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassAndMultifileClassClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("fileClassAndTImplClash.args") @TestMetadata("fileClassAndTImplClash.args")
public void testFileClassAndTImplClash() throws Exception { public void testFileClassAndTImplClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassAndTImplClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassAndTImplClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("fileClassClashMultipleFiles.args") @TestMetadata("fileClassClashMultipleFiles.args")
public void testFileClassClashMultipleFiles() throws Exception { public void testFileClassClashMultipleFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassClashMultipleFiles.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassClashMultipleFiles.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("help.args") @TestMetadata("help.args")
public void testHelp() throws Exception { public void testHelp() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/help.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/help.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("inlineCycle.args") @TestMetadata("inlineCycle.args")
public void testInlineCycle() throws Exception { public void testInlineCycle() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/inlineCycle.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/inlineCycle.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("multipleTextRangesInDiagnosticsOrder.args") @TestMetadata("multipleTextRangesInDiagnosticsOrder.args")
public void testMultipleTextRangesInDiagnosticsOrder() throws Exception { public void testMultipleTextRangesInDiagnosticsOrder() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("nonExistingClassPathAndAnnotationsPath.args") @TestMetadata("nonExistingClassPathAndAnnotationsPath.args")
public void testNonExistingClassPathAndAnnotationsPath() throws Exception { public void testNonExistingClassPathAndAnnotationsPath() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("nonExistingSourcePath.args") @TestMetadata("nonExistingSourcePath.args")
public void testNonExistingSourcePath() throws Exception { public void testNonExistingSourcePath() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonExistingSourcePath.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonExistingSourcePath.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("nonLocalDisabled.args") @TestMetadata("nonLocalDisabled.args")
public void testNonLocalDisabled() throws Exception { public void testNonLocalDisabled() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonLocalDisabled.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonLocalDisabled.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("nonexistentPathInModule.args") @TestMetadata("nonexistentPathInModule.args")
public void testNonexistentPathInModule() throws Exception { public void testNonexistentPathInModule() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonexistentPathInModule.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonexistentPathInModule.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("nonexistentScript.args") @TestMetadata("nonexistentScript.args")
public void testNonexistentScript() throws Exception { public void testNonexistentScript() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonexistentScript.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonexistentScript.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("pluginSimple.args") @TestMetadata("pluginSimple.args")
public void testPluginSimple() throws Exception { public void testPluginSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimple.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimple.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("pluginSimpleUsage.args") @TestMetadata("pluginSimpleUsage.args")
public void testPluginSimpleUsage() throws Exception { public void testPluginSimpleUsage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimpleUsage.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimpleUsage.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("sanitized-name.clash.args") @TestMetadata("sanitized-name.clash.args")
public void testSanitized_name_clash() throws Exception { public void testSanitized_name_clash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/sanitized-name.clash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/sanitized-name.clash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("signatureClash.args") @TestMetadata("signatureClash.args")
public void testSignatureClash() throws Exception { public void testSignatureClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/signatureClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/signatureClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("simple.args") @TestMetadata("simple.args")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/simple.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/simple.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("suppressAllWarningsJvm.args") @TestMetadata("suppressAllWarningsJvm.args")
public void testSuppressAllWarningsJvm() throws Exception { public void testSuppressAllWarningsJvm() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/suppressAllWarningsJvm.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/suppressAllWarningsJvm.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("syntheticAccessorForPropertiesSignatureClash.args") @TestMetadata("syntheticAccessorForPropertiesSignatureClash.args")
public void testSyntheticAccessorForPropertiesSignatureClash() throws Exception { public void testSyntheticAccessorForPropertiesSignatureClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("syntheticAccessorPropertyAndFunSignatureClash.args") @TestMetadata("syntheticAccessorPropertyAndFunSignatureClash.args")
public void testSyntheticAccessorPropertyAndFunSignatureClash() throws Exception { public void testSyntheticAccessorPropertyAndFunSignatureClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("syntheticAccessorSignatureClash.args") @TestMetadata("syntheticAccessorSignatureClash.args")
public void testSyntheticAccessorSignatureClash() throws Exception { public void testSyntheticAccessorSignatureClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorSignatureClash.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorSignatureClash.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("warningsInDummy.args") @TestMetadata("warningsInDummy.args")
public void testWarningsInDummy() throws Exception { public void testWarningsInDummy() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/warningsInDummy.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/warningsInDummy.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("wrongAbiVersion.args") @TestMetadata("wrongAbiVersion.args")
public void testWrongAbiVersion() throws Exception { public void testWrongAbiVersion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersion.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersion.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("wrongAbiVersionNoErrors.args") @TestMetadata("wrongAbiVersionNoErrors.args")
public void testWrongAbiVersionNoErrors() throws Exception { public void testWrongAbiVersionNoErrors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersionNoErrors.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersionNoErrors.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("wrongArgument.args") @TestMetadata("wrongArgument.args")
public void testWrongArgument() throws Exception { public void testWrongArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongArgument.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongArgument.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("wrongKotlinSignature.args") @TestMetadata("wrongKotlinSignature.args")
public void testWrongKotlinSignature() throws Exception { public void testWrongKotlinSignature() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongKotlinSignature.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongKotlinSignature.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
@TestMetadata("wrongScriptWithNoSource.args") @TestMetadata("wrongScriptWithNoSource.args")
public void testWrongScriptWithNoSource() throws Exception { public void testWrongScriptWithNoSource() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongScriptWithNoSource.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongScriptWithNoSource.args");
doJvmTest(fileName); doJvmTest(fileName);
} }
} }
@@ -265,120 +265,120 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Js extends AbstractKotlincExecutableTest { public static class Js extends AbstractKotlincExecutableTest {
public void testAllFilesPresentInJs() throws Exception { public void testAllFilesPresentInJs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/js"), Pattern.compile("^(.+)\\.args$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/js"), Pattern.compile("^(.+)\\.args$"), false);
} }
@TestMetadata("createMetadata.args") @TestMetadata("createMetadata.args")
public void testCreateMetadata() throws Exception { public void testCreateMetadata() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/createMetadata.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/createMetadata.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("diagnosticForClassLiteral.args") @TestMetadata("diagnosticForClassLiteral.args")
public void testDiagnosticForClassLiteral() throws Exception { public void testDiagnosticForClassLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticForClassLiteral.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticForClassLiteral.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("diagnosticForUnhandledElements.args") @TestMetadata("diagnosticForUnhandledElements.args")
public void testDiagnosticForUnhandledElements() throws Exception { public void testDiagnosticForUnhandledElements() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticForUnhandledElements.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticForUnhandledElements.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("diagnosticWhenReferenceToBuiltinsMember.args") @TestMetadata("diagnosticWhenReferenceToBuiltinsMember.args")
public void testDiagnosticWhenReferenceToBuiltinsMember() throws Exception { public void testDiagnosticWhenReferenceToBuiltinsMember() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/diagnosticWhenReferenceToBuiltinsMember.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("emptySources.args") @TestMetadata("emptySources.args")
public void testEmptySources() throws Exception { public void testEmptySources() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/emptySources.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/emptySources.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("inlineCycle.args") @TestMetadata("inlineCycle.args")
public void testInlineCycle() throws Exception { public void testInlineCycle() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/inlineCycle.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/inlineCycle.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("jsExtraHelp.args") @TestMetadata("jsExtraHelp.args")
public void testJsExtraHelp() throws Exception { public void testJsExtraHelp() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/jsExtraHelp.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/jsExtraHelp.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("jsHelp.args") @TestMetadata("jsHelp.args")
public void testJsHelp() throws Exception { public void testJsHelp() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/jsHelp.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/jsHelp.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("libraryDirNotFound.args") @TestMetadata("libraryDirNotFound.args")
public void testLibraryDirNotFound() throws Exception { public void testLibraryDirNotFound() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/libraryDirNotFound.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/libraryDirNotFound.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("nonExistingSourcePath.args") @TestMetadata("nonExistingSourcePath.args")
public void testNonExistingSourcePath() throws Exception { public void testNonExistingSourcePath() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/nonExistingSourcePath.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/nonExistingSourcePath.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("notValidLibraryDir.args") @TestMetadata("notValidLibraryDir.args")
public void testNotValidLibraryDir() throws Exception { public void testNotValidLibraryDir() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/notValidLibraryDir.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/notValidLibraryDir.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("outputIsDirectory.args") @TestMetadata("outputIsDirectory.args")
public void testOutputIsDirectory() throws Exception { public void testOutputIsDirectory() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputIsDirectory.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/outputIsDirectory.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("outputPostfixFileNotFound.args") @TestMetadata("outputPostfixFileNotFound.args")
public void testOutputPostfixFileNotFound() throws Exception { public void testOutputPostfixFileNotFound() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputPostfixFileNotFound.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/outputPostfixFileNotFound.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("outputPrefixFileNotFound.args") @TestMetadata("outputPrefixFileNotFound.args")
public void testOutputPrefixFileNotFound() throws Exception { public void testOutputPrefixFileNotFound() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/outputPrefixFileNotFound.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/outputPrefixFileNotFound.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("simple2js.args") @TestMetadata("simple2js.args")
public void testSimple2js() throws Exception { public void testSimple2js() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/simple2js.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/simple2js.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("suppressAllWarningsJS.args") @TestMetadata("suppressAllWarningsJS.args")
public void testSuppressAllWarningsJS() throws Exception { public void testSuppressAllWarningsJS() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/suppressAllWarningsJS.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/suppressAllWarningsJS.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("withFolderAsLib.args") @TestMetadata("withFolderAsLib.args")
public void testWithFolderAsLib() throws Exception { public void testWithFolderAsLib() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/withFolderAsLib.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/withFolderAsLib.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("withLib.args") @TestMetadata("withLib.args")
public void testWithLib() throws Exception { public void testWithLib() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/withLib.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/withLib.args");
doJsTest(fileName); doJsTest(fileName);
} }
@TestMetadata("wrongAbiVersion.args") @TestMetadata("wrongAbiVersion.args")
public void testWrongAbiVersion() throws Exception { public void testWrongAbiVersion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/js/wrongAbiVersion.args"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/wrongAbiVersion.args");
doJsTest(fileName); doJsTest(fileName);
} }
} }
@@ -19,9 +19,8 @@ package org.jetbrains.kotlin.code
import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtil
import junit.framework.TestCase import junit.framework.TestCase
import java.io.File import java.io.File
import java.util.ArrayList import java.util.*
import java.util.regex.Pattern import java.util.regex.Pattern
import kotlin.test.fail
public class CodeConformanceTest : TestCase() { public class CodeConformanceTest : TestCase() {
companion object { companion object {
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.codegen package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.org.objectweb.asm.* import org.jetbrains.org.objectweb.asm.*
import java.io.File import java.io.File
@@ -38,7 +38,7 @@ public abstract class AbstractBytecodeListingTest : CodegenTestCase() {
visitor.text visitor.text
}.joinToString("\n\n") }.joinToString("\n\n")
JetTestUtils.assertEqualsToFile(txtFile, generatedFiles) KotlinTestUtils.assertEqualsToFile(txtFile, generatedFiles)
} }
private class TextCollectingVisitor : ClassVisitor(Opcodes.ASM5) { private class TextCollectingVisitor : ClassVisitor(Opcodes.ASM5) {
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.backend.common.output.OutputFile;
import org.jetbrains.kotlin.backend.common.output.OutputFileCollection; import org.jetbrains.kotlin.backend.common.output.OutputFileCollection;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir; import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.org.objectweb.asm.*; import org.jetbrains.org.objectweb.asm.*;
@@ -54,7 +54,7 @@ public abstract class AbstractCheckLocalVariablesTableTest extends TestCaseWithT
@Override @Override
protected void setUp() throws Exception { protected void setUp() throws Exception {
super.setUp(); super.setUp();
jetCoreEnvironment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable); jetCoreEnvironment = KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable);
} }
@Override @Override
@@ -67,7 +67,7 @@ public abstract class AbstractCheckLocalVariablesTableTest extends TestCaseWithT
ktFile = new File(ktFileName); ktFile = new File(ktFileName);
String text = FileUtil.loadFile(ktFile, true); String text = FileUtil.loadFile(ktFile, true);
KtFile psiFile = JetTestUtils.createFile(ktFile.getName(), text, jetCoreEnvironment.getProject()); KtFile psiFile = KotlinTestUtils.createFile(ktFile.getName(), text, jetCoreEnvironment.getProject());
OutputFileCollection outputFiles = GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, jetCoreEnvironment); OutputFileCollection outputFiles = GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, jetCoreEnvironment);
@@ -95,7 +95,7 @@ public abstract class AbstractCheckLocalVariablesTableTest extends TestCaseWithT
ClassReader cr = new ClassReader(outputFile.asByteArray()); ClassReader cr = new ClassReader(outputFile.asByteArray());
List<LocalVariable> actualLocalVariables = readLocalVariable(cr, methodName); List<LocalVariable> actualLocalVariables = readLocalVariable(cr, methodName);
JetTestUtils.assertEqualsToFile(ktFile, text.substring(0, text.indexOf("// VARIABLE : ")) + getActualVariablesAsString(actualLocalVariables)); KotlinTestUtils.assertEqualsToFile(ktFile, text.substring(0, text.indexOf("// VARIABLE : ")) + getActualVariablesAsString(actualLocalVariables));
} }
private static String getActualVariablesAsString(List<LocalVariable> list) { private static String getActualVariablesAsString(List<LocalVariable> list) {
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.codegen.state.GenerationState; import org.jetbrains.kotlin.codegen.state.GenerationState;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir; import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
@@ -51,15 +51,15 @@ public abstract class AbstractLineNumberTest extends TestCaseWithTmpdir {
@NotNull @NotNull
private static String getTestDataPath() { private static String getTestDataPath() {
return JetTestUtils.getTestDataPathBase() + "/lineNumber"; return KotlinTestUtils.getTestDataPathBase() + "/lineNumber";
} }
@NotNull @NotNull
private KotlinCoreEnvironment createEnvironment() { private KotlinCoreEnvironment createEnvironment() {
return KotlinCoreEnvironment.createForTests( return KotlinCoreEnvironment.createForTests(
myTestRootDisposable, myTestRootDisposable,
JetTestUtils.compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, KotlinTestUtils.compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK,
JetTestUtils.getAnnotationsJar(), tmpdir), KotlinTestUtils.getAnnotationsJar(), tmpdir),
EnvironmentConfigFiles.JVM_CONFIG_FILES); EnvironmentConfigFiles.JVM_CONFIG_FILES);
} }
@@ -68,9 +68,9 @@ public abstract class AbstractLineNumberTest extends TestCaseWithTmpdir {
super.setUp(); super.setUp();
KotlinCoreEnvironment environment = createEnvironment(); KotlinCoreEnvironment environment = createEnvironment();
KtFile psiFile = JetTestUtils.createFile(LINE_NUMBER_FUN + ".kt", KtFile psiFile = KotlinTestUtils.createFile(LINE_NUMBER_FUN + ".kt",
"package test;\n\npublic fun " + LINE_NUMBER_FUN + "(): Int = 0\n", "package test;\n\npublic fun " + LINE_NUMBER_FUN + "(): Int = 0\n",
environment.getProject()); environment.getProject());
OutputFileCollection outputFiles = OutputFileCollection outputFiles =
GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, environment); GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, environment);
@@ -90,7 +90,7 @@ public abstract class AbstractLineNumberTest extends TestCaseWithTmpdir {
throw ExceptionUtilsKt.rethrow(e); throw ExceptionUtilsKt.rethrow(e);
} }
return new Pair(JetTestUtils.createFile(file.getName(), text, environment.getProject()), environment); return new Pair(KotlinTestUtils.createFile(file.getName(), text, environment.getProject()), environment);
} }
private void doTest(@NotNull String filename, boolean custom) { private void doTest(@NotNull String filename, boolean custom) {
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles; import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
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.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
@@ -68,13 +68,13 @@ public abstract class AbstractTopLevelMembersInvocationTest extends AbstractByte
myEnvironment = KotlinCoreEnvironment.createForTests( myEnvironment = KotlinCoreEnvironment.createForTests(
getTestRootDisposable(), getTestRootDisposable(),
JetTestUtils.compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, KotlinTestUtils.compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK,
CollectionsKt.plus(classPath, JetTestUtils.getAnnotationsJar()), classPath), CollectionsKt.plus(classPath, KotlinTestUtils.getAnnotationsJar()), classPath),
EnvironmentConfigFiles.JVM_CONFIG_FILES); EnvironmentConfigFiles.JVM_CONFIG_FILES);
loadFiles(ArrayUtil.toStringArray(sourceFiles)); loadFiles(ArrayUtil.toStringArray(sourceFiles));
List<OccurrenceInfo> expected = readExpectedOccurrences(JetTestUtils.getTestDataPathBase() + "/codegen/" + sourceFiles.get(0)); List<OccurrenceInfo> expected = readExpectedOccurrences(KotlinTestUtils.getTestDataPathBase() + "/codegen/" + sourceFiles.get(0));
countAndCompareActualOccurrences(expected); countAndCompareActualOccurrences(expected);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen;
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,12 +32,12 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
public void testAllFilesPresentInBytecodeListing() throws Exception { public void testAllFilesPresentInBytecodeListing() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("defaultImpls.kt") @TestMetadata("defaultImpls.kt")
public void testDefaultImpls() throws Exception { public void testDefaultImpls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/defaultImpls.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/defaultImpls.kt");
doTest(fileName); doTest(fileName);
} }
@@ -46,36 +46,36 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Annotations extends AbstractBytecodeListingTest { public static class Annotations extends AbstractBytecodeListingTest {
public void testAllFilesPresentInAnnotations() throws Exception { public void testAllFilesPresentInAnnotations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("defaultTargets.kt") @TestMetadata("defaultTargets.kt")
public void testDefaultTargets() throws Exception { public void testDefaultTargets() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("JvmSynthetic.kt") @TestMetadata("JvmSynthetic.kt")
public void testJvmSynthetic() throws Exception { public void testJvmSynthetic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("literals.kt") @TestMetadata("literals.kt")
public void testLiterals() throws Exception { public void testLiterals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/literals.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/literals.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onProperties.kt") @TestMetadata("onProperties.kt")
public void testOnProperties() throws Exception { public void testOnProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onReceiver.kt") @TestMetadata("onReceiver.kt")
public void testOnReceiver() throws Exception { public void testOnReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/onReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/onReceiver.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -85,12 +85,12 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class SpecialBridges extends AbstractBytecodeListingTest { public static class SpecialBridges extends AbstractBytecodeListingTest {
public void testAllFilesPresentInSpecialBridges() throws Exception { public void testAllFilesPresentInSpecialBridges() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("contains.kt") @TestMetadata("contains.kt")
public void testContains() throws Exception { public void testContains() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen;
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,30 +32,30 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class BytecodeTextMultifileTestGenerated extends AbstractBytecodeTextTest { public class BytecodeTextMultifileTestGenerated extends AbstractBytecodeTextTest {
public void testAllFilesPresentInBytecodeTextMultifile() throws Exception { public void testAllFilesPresentInBytecodeTextMultifile() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeTextMultifile"), Pattern.compile("^([^\\.]+)$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeTextMultifile"), Pattern.compile("^([^\\.]+)$"), false);
} }
@TestMetadata("inlineJavaStaticFields") @TestMetadata("inlineJavaStaticFields")
public void testInlineJavaStaticFields() throws Exception { public void testInlineJavaStaticFields() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/inlineJavaStaticFields/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/inlineJavaStaticFields/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("javaStatics") @TestMetadata("javaStatics")
public void testJavaStatics() throws Exception { public void testJavaStatics() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/javaStatics/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/javaStatics/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("partMembersCall") @TestMetadata("partMembersCall")
public void testPartMembersCall() throws Exception { public void testPartMembersCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/partMembersCall/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/partMembersCall/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("partMembersInline") @TestMetadata("partMembersInline")
public void testPartMembersInline() throws Exception { public void testPartMembersInline() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/partMembersInline/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeTextMultifile/partMembersInline/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
} }
File diff suppressed because it is too large Load Diff
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen;
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,66 +32,66 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class CheckLocalVariablesTableTestGenerated extends AbstractCheckLocalVariablesTableTest { public class CheckLocalVariablesTableTestGenerated extends AbstractCheckLocalVariablesTableTest {
public void testAllFilesPresentInCheckLocalVariablesTable() throws Exception { public void testAllFilesPresentInCheckLocalVariablesTable() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/checkLocalVariablesTable"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/checkLocalVariablesTable"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("catchClause.kt") @TestMetadata("catchClause.kt")
public void testCatchClause() throws Exception { public void testCatchClause() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/catchClause.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/catchClause.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("copyFunction.kt") @TestMetadata("copyFunction.kt")
public void testCopyFunction() throws Exception { public void testCopyFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/copyFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/copyFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineLambdaWithItParam.kt") @TestMetadata("inlineLambdaWithItParam.kt")
public void testInlineLambdaWithItParam() throws Exception { public void testInlineLambdaWithItParam() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineLambdaWithItParam.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineLambdaWithItParam.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineLambdaWithParam.kt") @TestMetadata("inlineLambdaWithParam.kt")
public void testInlineLambdaWithParam() throws Exception { public void testInlineLambdaWithParam() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineLambdaWithParam.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineLambdaWithParam.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineSimple.kt") @TestMetadata("inlineSimple.kt")
public void testInlineSimple() throws Exception { public void testInlineSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineSimple.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineSimple.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineSimpleChain.kt") @TestMetadata("inlineSimpleChain.kt")
public void testInlineSimpleChain() throws Exception { public void testInlineSimpleChain() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineSimpleChain.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineSimpleChain.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("itInLambda.kt") @TestMetadata("itInLambda.kt")
public void testItInLambda() throws Exception { public void testItInLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/itInLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/itInLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("itInReturnedLambda.kt") @TestMetadata("itInReturnedLambda.kt")
public void testItInReturnedLambda() throws Exception { public void testItInReturnedLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/itInReturnedLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/itInReturnedLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("lambdaAsVar.kt") @TestMetadata("lambdaAsVar.kt")
public void testLambdaAsVar() throws Exception { public void testLambdaAsVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/lambdaAsVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/lambdaAsVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFun.kt") @TestMetadata("localFun.kt")
public void testLocalFun() throws Exception { public void testLocalFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/localFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/localFun.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -30,11 +30,9 @@ import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt;
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime; import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil; import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil;
import org.jetbrains.kotlin.fileClasses.NoResolveFileClassesProvider;
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils;
import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
import org.jetbrains.org.objectweb.asm.ClassReader; import org.jetbrains.org.objectweb.asm.ClassReader;
@@ -59,8 +57,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import static org.jetbrains.kotlin.codegen.CodegenTestUtil.*; import static org.jetbrains.kotlin.codegen.CodegenTestUtil.*;
import static org.jetbrains.kotlin.test.JetTestUtils.compilerConfigurationForTests; import static org.jetbrains.kotlin.test.KotlinTestUtils.compilerConfigurationForTests;
import static org.jetbrains.kotlin.test.JetTestUtils.getAnnotationsJar; import static org.jetbrains.kotlin.test.KotlinTestUtils.getAnnotationsJar;
public abstract class CodegenTestCase extends UsefulTestCase { public abstract class CodegenTestCase extends UsefulTestCase {
@@ -108,7 +106,7 @@ public abstract class CodegenTestCase extends UsefulTestCase {
@NotNull @NotNull
protected String loadFile(@NotNull @TestDataFile String name) { protected String loadFile(@NotNull @TestDataFile String name) {
return loadFileByFullPath(JetTestUtils.getTestDataPathBase() + "/codegen/" + name); return loadFileByFullPath(KotlinTestUtils.getTestDataPathBase() + "/codegen/" + name);
} }
@NotNull @NotNull
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.resolve.AnalyzerScriptParameter; import org.jetbrains.kotlin.resolve.AnalyzerScriptParameter;
import org.jetbrains.kotlin.resolve.AnalyzingUtils; import org.jetbrains.kotlin.resolve.AnalyzingUtils;
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform; import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.types.KotlinType; import org.jetbrains.kotlin.types.KotlinType;
import org.jetbrains.kotlin.types.Variance; import org.jetbrains.kotlin.types.Variance;
@@ -82,17 +82,17 @@ public class CodegenTestFiles {
} }
public static CodegenTestFiles create(Project project, String[] names) { public static CodegenTestFiles create(Project project, String[] names) {
return create(project, names, JetTestUtils.getTestDataPathBase()); return create(project, names, KotlinTestUtils.getTestDataPathBase());
} }
public static CodegenTestFiles create(Project project, String[] names, String testDataPath) { public static CodegenTestFiles create(Project project, String[] names, String testDataPath) {
ArrayList<KtFile> files = new ArrayList<KtFile>(); ArrayList<KtFile> files = new ArrayList<KtFile>();
for (String name : names) { for (String name : names) {
try { try {
String content = JetTestUtils.doLoadFile(testDataPath + "/codegen/", name); String content = KotlinTestUtils.doLoadFile(testDataPath + "/codegen/", name);
int i = name.lastIndexOf('/'); int i = name.lastIndexOf('/');
//name = name.substring(i+1); //name = name.substring(i+1);
KtFile file = JetTestUtils.createFile(name, content, project); KtFile file = KotlinTestUtils.createFile(name, content, project);
files.add(file); files.add(file);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
@@ -104,7 +104,7 @@ public class CodegenTestFiles {
@NotNull @NotNull
public static CodegenTestFiles create(@NotNull String fileName, @NotNull String contentWithDiagnosticMarkup, @NotNull Project project) { public static CodegenTestFiles create(@NotNull String fileName, @NotNull String contentWithDiagnosticMarkup, @NotNull Project project) {
String content = CheckerTestUtil.parseDiagnosedRanges(contentWithDiagnosticMarkup, new ArrayList<CheckerTestUtil.DiagnosedRange>()); String content = CheckerTestUtil.parseDiagnosedRanges(contentWithDiagnosticMarkup, new ArrayList<CheckerTestUtil.DiagnosedRange>());
KtFile file = JetTestUtils.createFile(fileName, content, project); KtFile file = KotlinTestUtils.createFile(fileName, content, project);
List<PsiErrorElement> ranges = AnalyzingUtils.getSyntaxErrorRanges(file); List<PsiErrorElement> ranges = AnalyzingUtils.getSyntaxErrorRanges(file);
assert ranges.isEmpty() : "Syntax errors found in " + file + ": " + ranges; assert ranges.isEmpty() : "Syntax errors found in " + file + ": " + ranges;
@@ -31,7 +31,7 @@ import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.resolve.AnalyzingUtils; import org.jetbrains.kotlin.resolve.AnalyzingUtils;
import org.jetbrains.kotlin.resolve.BindingTraceContext; import org.jetbrains.kotlin.resolve.BindingTraceContext;
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil; import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
import java.io.File; import java.io.File;
@@ -120,11 +120,11 @@ public class CodegenTestUtil {
@NotNull List<String> additionalOptions @NotNull List<String> additionalOptions
) { ) {
try { try {
File javaClassesTempDirectory = JetTestUtils.tmpDir("java-classes"); File javaClassesTempDirectory = KotlinTestUtils.tmpDir("java-classes");
List<String> classpath = new ArrayList<String>(); List<String> classpath = new ArrayList<String>();
classpath.add(ForTestCompileRuntime.runtimeJarForTests().getPath()); classpath.add(ForTestCompileRuntime.runtimeJarForTests().getPath());
classpath.add(ForTestCompileRuntime.reflectJarForTests().getPath()); classpath.add(ForTestCompileRuntime.reflectJarForTests().getPath());
classpath.add(JetTestUtils.getAnnotationsJar().getPath()); classpath.add(KotlinTestUtils.getAnnotationsJar().getPath());
classpath.addAll(additionalClasspath); classpath.addAll(additionalClasspath);
List<String> options = new ArrayList<String>(Arrays.asList( List<String> options = new ArrayList<String>(Arrays.asList(
@@ -136,11 +136,11 @@ public class CodegenTestUtil {
List<File> fileList = Lists.transform(fileNames, new Function<String, File>() { List<File> fileList = Lists.transform(fileNames, new Function<String, File>() {
@Override @Override
public File apply(@Nullable String input) { public File apply(@Nullable String input) {
return new File(JetTestUtils.getTestDataPathBase() + "/codegen/" + input); return new File(KotlinTestUtils.getTestDataPathBase() + "/codegen/" + input);
} }
}); });
JetTestUtils.compileJavaFiles(fileList, options); KotlinTestUtils.compileJavaFiles(fileList, options);
return javaClassesTempDirectory; return javaClassesTempDirectory;
} }
@@ -29,7 +29,7 @@ import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil; import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.org.objectweb.asm.ClassReader; import org.jetbrains.org.objectweb.asm.ClassReader;
import org.jetbrains.org.objectweb.asm.ClassVisitor; import org.jetbrains.org.objectweb.asm.ClassVisitor;
@@ -48,7 +48,7 @@ public class GenerateNotNullAssertionsTest extends CodegenTestCase {
} }
private void setUpEnvironment(boolean disableCallAssertions, boolean disableParamAssertions, File... extraClassPath) { private void setUpEnvironment(boolean disableCallAssertions, boolean disableParamAssertions, File... extraClassPath) {
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, extraClassPath); ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, extraClassPath);
configuration.put(JVMConfigurationKeys.DISABLE_CALL_ASSERTIONS, disableCallAssertions); configuration.put(JVMConfigurationKeys.DISABLE_CALL_ASSERTIONS, disableCallAssertions);
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.codegen;
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles; import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.junit.Test; import org.junit.Test;
@@ -39,7 +39,7 @@ public class JUnitUsageGenTest extends CodegenTestCase {
myEnvironment = KotlinCoreEnvironment.createForTests( myEnvironment = KotlinCoreEnvironment.createForTests(
getTestRootDisposable(), getTestRootDisposable(),
JetTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, junitJar), KotlinTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, junitJar),
EnvironmentConfigFiles.JVM_CONFIG_FILES); EnvironmentConfigFiles.JVM_CONFIG_FILES);
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen;
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,108 +34,108 @@ public class LineNumberTestGenerated extends AbstractLineNumberTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class LineNumber extends AbstractLineNumberTest { public static class LineNumber extends AbstractLineNumberTest {
public void testAllFilesPresentInLineNumber() throws Exception { public void testAllFilesPresentInLineNumber() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), false);
} }
@TestMetadata("anonymousFunction.kt") @TestMetadata("anonymousFunction.kt")
public void testAnonymousFunction() throws Exception { public void testAnonymousFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/anonymousFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/anonymousFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("class.kt") @TestMetadata("class.kt")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/class.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/class.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classObject.kt") @TestMetadata("classObject.kt")
public void testClassObject() throws Exception { public void testClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/classObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/classObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("defaultParameter.kt") @TestMetadata("defaultParameter.kt")
public void testDefaultParameter() throws Exception { public void testDefaultParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/defaultParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/defaultParameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enum.kt") @TestMetadata("enum.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/enum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/enum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("for.kt") @TestMetadata("for.kt")
public void testFor() throws Exception { public void testFor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/for.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/for.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("if.kt") @TestMetadata("if.kt")
public void testIf() throws Exception { public void testIf() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/if.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/if.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inlineSimpleCall.kt") @TestMetadata("inlineSimpleCall.kt")
public void testInlineSimpleCall() throws Exception { public void testInlineSimpleCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/inlineSimpleCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/inlineSimpleCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localFunction.kt") @TestMetadata("localFunction.kt")
public void testLocalFunction() throws Exception { public void testLocalFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/localFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/localFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("object.kt") @TestMetadata("object.kt")
public void testObject() throws Exception { public void testObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/object.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/object.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyAccessor.kt") @TestMetadata("propertyAccessor.kt")
public void testPropertyAccessor() throws Exception { public void testPropertyAccessor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/propertyAccessor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/propertyAccessor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("psvm.kt") @TestMetadata("psvm.kt")
public void testPsvm() throws Exception { public void testPsvm() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/psvm.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/psvm.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleSmap.kt") @TestMetadata("simpleSmap.kt")
public void testSimpleSmap() throws Exception { public void testSimpleSmap() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/simpleSmap.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/simpleSmap.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevel.kt") @TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception { public void testTopLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/topLevel.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/topLevel.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("trait.kt") @TestMetadata("trait.kt")
public void testTrait() throws Exception { public void testTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/trait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/trait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch() throws Exception { public void testTryCatch() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/tryCatch.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/tryCatch.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("while.kt") @TestMetadata("while.kt")
public void testWhile() throws Exception { public void testWhile() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/while.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/while.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -145,126 +145,126 @@ public class LineNumberTestGenerated extends AbstractLineNumberTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Custom extends AbstractLineNumberTest { public static class Custom extends AbstractLineNumberTest {
public void testAllFilesPresentInCustom() throws Exception { public void testAllFilesPresentInCustom() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lineNumber/custom"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lineNumber/custom"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("callWithCallInArguments.kt") @TestMetadata("callWithCallInArguments.kt")
public void testCallWithCallInArguments() throws Exception { public void testCallWithCallInArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/callWithCallInArguments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/callWithCallInArguments.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("callWithReceiver.kt") @TestMetadata("callWithReceiver.kt")
public void testCallWithReceiver() throws Exception { public void testCallWithReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/callWithReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/callWithReceiver.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("chainCall.kt") @TestMetadata("chainCall.kt")
public void testChainCall() throws Exception { public void testChainCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/chainCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/chainCall.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("compileTimeConstant.kt") @TestMetadata("compileTimeConstant.kt")
public void testCompileTimeConstant() throws Exception { public void testCompileTimeConstant() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/compileTimeConstant.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/compileTimeConstant.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("functionCallWithDefault.kt") @TestMetadata("functionCallWithDefault.kt")
public void testFunctionCallWithDefault() throws Exception { public void testFunctionCallWithDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithDefault.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("functionCallWithInlinedLambdaParam.kt") @TestMetadata("functionCallWithInlinedLambdaParam.kt")
public void testFunctionCallWithInlinedLambdaParam() throws Exception { public void testFunctionCallWithInlinedLambdaParam() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithInlinedLambdaParam.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithInlinedLambdaParam.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("functionCallWithLambdaParam.kt") @TestMetadata("functionCallWithLambdaParam.kt")
public void testFunctionCallWithLambdaParam() throws Exception { public void testFunctionCallWithLambdaParam() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithLambdaParam.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithLambdaParam.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("ifThen.kt") @TestMetadata("ifThen.kt")
public void testIfThen() throws Exception { public void testIfThen() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/ifThen.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/ifThen.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("ifThenElse.kt") @TestMetadata("ifThenElse.kt")
public void testIfThenElse() throws Exception { public void testIfThenElse() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/ifThenElse.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/ifThenElse.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("multilineFunctionCall.kt") @TestMetadata("multilineFunctionCall.kt")
public void testMultilineFunctionCall() throws Exception { public void testMultilineFunctionCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/multilineFunctionCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/multilineFunctionCall.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("multilineInfixCall.kt") @TestMetadata("multilineInfixCall.kt")
public void testMultilineInfixCall() throws Exception { public void testMultilineInfixCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/multilineInfixCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/multilineInfixCall.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("smapInlineAsArgument.kt") @TestMetadata("smapInlineAsArgument.kt")
public void testSmapInlineAsArgument() throws Exception { public void testSmapInlineAsArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsArgument.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsArgument.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("smapInlineAsInfixArgument.kt") @TestMetadata("smapInlineAsInfixArgument.kt")
public void testSmapInlineAsInfixArgument() throws Exception { public void testSmapInlineAsInfixArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsInfixArgument.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsInfixArgument.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("smapInlineAsInlineArgument.kt") @TestMetadata("smapInlineAsInlineArgument.kt")
public void testSmapInlineAsInlineArgument() throws Exception { public void testSmapInlineAsInlineArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("smapInlineInIntrinsicArgument.kt") @TestMetadata("smapInlineInIntrinsicArgument.kt")
public void testSmapInlineInIntrinsicArgument() throws Exception { public void testSmapInlineInIntrinsicArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineInIntrinsicArgument.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineInIntrinsicArgument.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("tryCatchExpression.kt") @TestMetadata("tryCatchExpression.kt")
public void testTryCatchExpression() throws Exception { public void testTryCatchExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryCatchExpression.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryCatchExpression.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("tryCatchFinally.kt") @TestMetadata("tryCatchFinally.kt")
public void testTryCatchFinally() throws Exception { public void testTryCatchFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryCatchFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryCatchFinally.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("tryFinally.kt") @TestMetadata("tryFinally.kt")
public void testTryFinally() throws Exception { public void testTryFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryFinally.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryFinally.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("when.kt") @TestMetadata("when.kt")
public void testWhen() throws Exception { public void testWhen() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/when.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/when.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
@TestMetadata("whenSubject.kt") @TestMetadata("whenSubject.kt")
public void testWhenSubject() throws Exception { public void testWhenSubject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/whenSubject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/whenSubject.kt");
doTestCustom(fileName); doTestCustom(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen;
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,102 +32,102 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ScriptCodegenTestGenerated extends AbstractScriptCodegenTest { public class ScriptCodegenTestGenerated extends AbstractScriptCodegenTest {
public void testAllFilesPresentInScript() throws Exception { public void testAllFilesPresentInScript() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/script"), Pattern.compile("^(.+)\\.kts$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/script"), Pattern.compile("^(.+)\\.kts$"), true);
} }
@TestMetadata("empty.kts") @TestMetadata("empty.kts")
public void testEmpty() throws Exception { public void testEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/empty.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/empty.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("helloWorld.kts") @TestMetadata("helloWorld.kts")
public void testHelloWorld() throws Exception { public void testHelloWorld() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/helloWorld.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/helloWorld.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inline.kts") @TestMetadata("inline.kts")
public void testInline() throws Exception { public void testInline() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/inline.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/inline.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("outerCapture.kts") @TestMetadata("outerCapture.kts")
public void testOuterCapture() throws Exception { public void testOuterCapture() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/outerCapture.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/outerCapture.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parameter.kts") @TestMetadata("parameter.kts")
public void testParameter() throws Exception { public void testParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/parameter.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameter.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parameterArray.kts") @TestMetadata("parameterArray.kts")
public void testParameterArray() throws Exception { public void testParameterArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterArray.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterArray.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parameterClosure.kts") @TestMetadata("parameterClosure.kts")
public void testParameterClosure() throws Exception { public void testParameterClosure() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterClosure.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterClosure.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parameterLong.kts") @TestMetadata("parameterLong.kts")
public void testParameterLong() throws Exception { public void testParameterLong() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterLong.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterLong.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("secondLevelFunction.kts") @TestMetadata("secondLevelFunction.kts")
public void testSecondLevelFunction() throws Exception { public void testSecondLevelFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelFunction.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelFunction.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("secondLevelFunctionClosure.kts") @TestMetadata("secondLevelFunctionClosure.kts")
public void testSecondLevelFunctionClosure() throws Exception { public void testSecondLevelFunctionClosure() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelFunctionClosure.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelFunctionClosure.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("secondLevelVal.kts") @TestMetadata("secondLevelVal.kts")
public void testSecondLevelVal() throws Exception { public void testSecondLevelVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelVal.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelVal.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleClass.kts") @TestMetadata("simpleClass.kts")
public void testSimpleClass() throws Exception { public void testSimpleClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/simpleClass.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/simpleClass.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("string.kts") @TestMetadata("string.kts")
public void testString() throws Exception { public void testString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/string.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/string.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelFunction.kts") @TestMetadata("topLevelFunction.kts")
public void testTopLevelFunction() throws Exception { public void testTopLevelFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelFunction.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelFunction.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelFunctionClosure.kts") @TestMetadata("topLevelFunctionClosure.kts")
public void testTopLevelFunctionClosure() throws Exception { public void testTopLevelFunctionClosure() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelFunctionClosure.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelFunctionClosure.kts");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelProperty.kts") @TestMetadata("topLevelProperty.kts")
public void testTopLevelProperty() throws Exception { public void testTopLevelProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelProperty.kts"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelProperty.kts");
doTest(fileName); doTest(fileName);
} }
} }
@@ -40,7 +40,7 @@ import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.resolve.BindingContext; import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.BindingContextUtils; import org.jetbrains.kotlin.resolve.BindingContextUtils;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.types.KotlinType; import org.jetbrains.kotlin.types.KotlinType;
@@ -82,15 +82,15 @@ public class TestlibTest extends UsefulTestCase {
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.FULL_JDK); CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.FULL_JDK);
JvmContentRootsKt.addJvmClasspathRoot(configuration, JetTestUtils.getAnnotationsJar()); JvmContentRootsKt.addJvmClasspathRoot(configuration, KotlinTestUtils.getAnnotationsJar());
junitJar = new File("libraries/lib/junit-4.11.jar"); junitJar = new File("libraries/lib/junit-4.11.jar");
assertTrue(junitJar.exists()); assertTrue(junitJar.exists());
JvmContentRootsKt.addJvmClasspathRoot(configuration, junitJar); JvmContentRootsKt.addJvmClasspathRoot(configuration, junitJar);
ContentRootsKt.addKotlinSourceRoot(configuration, JetTestUtils.getHomeDirectory() + "/libraries/stdlib/test"); ContentRootsKt.addKotlinSourceRoot(configuration, KotlinTestUtils.getHomeDirectory() + "/libraries/stdlib/test");
ContentRootsKt.addKotlinSourceRoot(configuration, JetTestUtils.getHomeDirectory() + "/libraries/kunit/src"); ContentRootsKt.addKotlinSourceRoot(configuration, KotlinTestUtils.getHomeDirectory() + "/libraries/kunit/src");
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, PrintingMessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR); configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, PrintingMessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR);
myEnvironment = KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); myEnvironment = KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen;
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 TopLevelMembersInvocationTestGenerated extends AbstractTopLevelMembersInvocationTest { public class TopLevelMembersInvocationTestGenerated extends AbstractTopLevelMembersInvocationTest {
public void testAllFilesPresentInTopLevelMemberInvocation() throws Exception { public void testAllFilesPresentInTopLevelMemberInvocation() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/topLevelMemberInvocation"), Pattern.compile("^([^\\.]+)$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/topLevelMemberInvocation"), Pattern.compile("^([^\\.]+)$"), false);
} }
@TestMetadata("extensionFunction") @TestMetadata("extensionFunction")
public void testExtensionFunction() throws Exception { public void testExtensionFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/extensionFunction/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/extensionFunction/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionDifferentPackage") @TestMetadata("functionDifferentPackage")
public void testFunctionDifferentPackage() throws Exception { public void testFunctionDifferentPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionDifferentPackage/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionDifferentPackage/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionInMultiFilePackage") @TestMetadata("functionInMultiFilePackage")
public void testFunctionInMultiFilePackage() throws Exception { public void testFunctionInMultiFilePackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionSamePackage") @TestMetadata("functionSamePackage")
public void testFunctionSamePackage() throws Exception { public void testFunctionSamePackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionSamePackage/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionSamePackage/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("property") @TestMetadata("property")
public void testProperty() throws Exception { public void testProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/property/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/property/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyWithGetter") @TestMetadata("propertyWithGetter")
public void testPropertyWithGetter() throws Exception { public void testPropertyWithGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/propertyWithGetter/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/propertyWithGetter/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("twoModules") @TestMetadata("twoModules")
public void testTwoModules() throws Exception { public void testTwoModules() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/twoModules/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/twoModules/");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.defaultConstructor;
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,78 +32,78 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class DefaultArgumentsReflectionTestGenerated extends AbstractDefaultArgumentsReflectionTest { public class DefaultArgumentsReflectionTestGenerated extends AbstractDefaultArgumentsReflectionTest {
public void testAllFilesPresentInReflection() throws Exception { public void testAllFilesPresentInReflection() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/defaultArguments/reflection"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/defaultArguments/reflection"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("classInClassObject.kt") @TestMetadata("classInClassObject.kt")
public void testClassInClassObject() throws Exception { public void testClassInClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classInObject.kt") @TestMetadata("classInObject.kt")
public void testClassInObject() throws Exception { public void testClassInObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classInObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classInObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithTwoDefaultArgs.kt") @TestMetadata("classWithTwoDefaultArgs.kt")
public void testClassWithTwoDefaultArgs() throws Exception { public void testClassWithTwoDefaultArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classWithTwoDefaultArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classWithTwoDefaultArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithVararg.kt") @TestMetadata("classWithVararg.kt")
public void testClassWithVararg() throws Exception { public void testClassWithVararg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classWithVararg.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classWithVararg.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enum.kt") @TestMetadata("enum.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/enum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/enum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalClass.kt") @TestMetadata("internalClass.kt")
public void testInternalClass() throws Exception { public void testInternalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/internalClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/internalClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateClass.kt") @TestMetadata("privateClass.kt")
public void testPrivateClass() throws Exception { public void testPrivateClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/privateClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/privateClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateConstructor.kt") @TestMetadata("privateConstructor.kt")
public void testPrivateConstructor() throws Exception { public void testPrivateConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/privateConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/privateConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicClass.kt") @TestMetadata("publicClass.kt")
public void testPublicClass() throws Exception { public void testPublicClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicClassWoDefArgs.kt") @TestMetadata("publicClassWoDefArgs.kt")
public void testPublicClassWoDefArgs() throws Exception { public void testPublicClassWoDefArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicClassWoDefArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicClassWoDefArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicInnerClass.kt") @TestMetadata("publicInnerClass.kt")
public void testPublicInnerClass() throws Exception { public void testPublicInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicInnerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicInnerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicInnerClassInPrivateClass.kt") @TestMetadata("publicInnerClassInPrivateClass.kt")
public void testPublicInnerClassInPrivateClass() throws Exception { public void testPublicInnerClassInPrivateClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicInnerClassInPrivateClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicInnerClassInPrivateClass.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.codegen.GenerationUtils; import org.jetbrains.kotlin.codegen.GenerationUtils;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.org.objectweb.asm.*; import org.jetbrains.org.objectweb.asm.*;
import java.io.File; import java.io.File;
@@ -60,7 +60,7 @@ public abstract class AbstractWriteFlagsTest extends UsefulTestCase {
@Override @Override
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
jetCoreEnvironment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_ONLY); jetCoreEnvironment = KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_ONLY);
} }
@Override @Override
@@ -75,7 +75,7 @@ public abstract class AbstractWriteFlagsTest extends UsefulTestCase {
String fileText = FileUtil.loadFile(ktFile, true); String fileText = FileUtil.loadFile(ktFile, true);
KtFile psiFile = JetTestUtils.createFile(ktFile.getName(), fileText, jetCoreEnvironment.getProject()); KtFile psiFile = KotlinTestUtils.createFile(ktFile.getName(), fileText, jetCoreEnvironment.getProject());
OutputFileCollection outputFiles = GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, jetCoreEnvironment); OutputFileCollection outputFiles = GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, jetCoreEnvironment);
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.flags;
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,7 +32,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
public void testAllFilesPresentInWriteFlags() throws Exception { public void testAllFilesPresentInWriteFlags() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/callableReference") @TestMetadata("compiler/testData/writeFlags/callableReference")
@@ -40,7 +40,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class CallableReference extends AbstractWriteFlagsTest { public static class CallableReference extends AbstractWriteFlagsTest {
public void testAllFilesPresentInCallableReference() throws Exception { public void testAllFilesPresentInCallableReference() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/callableReference/visibility") @TestMetadata("compiler/testData/writeFlags/callableReference/visibility")
@@ -48,30 +48,30 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Visibility extends AbstractWriteFlagsTest { public static class Visibility extends AbstractWriteFlagsTest {
public void testAllFilesPresentInVisibility() throws Exception { public void testAllFilesPresentInVisibility() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference/visibility"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference/visibility"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("functionReference.kt") @TestMetadata("functionReference.kt")
public void testFunctionReference() throws Exception { public void testFunctionReference() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/functionReference.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/functionReference.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionReferenceInInlineFunction.kt") @TestMetadata("functionReferenceInInlineFunction.kt")
public void testFunctionReferenceInInlineFunction() throws Exception { public void testFunctionReferenceInInlineFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyReference.kt") @TestMetadata("propertyReference.kt")
public void testPropertyReference() throws Exception { public void testPropertyReference() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyReferenceInInlineFunction.kt") @TestMetadata("propertyReferenceInInlineFunction.kt")
public void testPropertyReferenceInInlineFunction() throws Exception { public void testPropertyReferenceInInlineFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -82,7 +82,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Class extends AbstractWriteFlagsTest { public static class Class extends AbstractWriteFlagsTest {
public void testAllFilesPresentInClass() throws Exception { public void testAllFilesPresentInClass() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/class/accessFlags") @TestMetadata("compiler/testData/writeFlags/class/accessFlags")
@@ -90,36 +90,36 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class AccessFlags extends AbstractWriteFlagsTest { public static class AccessFlags extends AbstractWriteFlagsTest {
public void testAllFilesPresentInAccessFlags() throws Exception { public void testAllFilesPresentInAccessFlags() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/accessFlags"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/accessFlags"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("objectLiteral.kt") @TestMetadata("objectLiteral.kt")
public void testObjectLiteral() throws Exception { public void testObjectLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/objectLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/objectLiteral.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicFinalClass.kt") @TestMetadata("publicFinalClass.kt")
public void testPublicFinalClass() throws Exception { public void testPublicFinalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicFinalClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicFinalClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicFinalInnerClass.kt") @TestMetadata("publicFinalInnerClass.kt")
public void testPublicFinalInnerClass() throws Exception { public void testPublicFinalInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicFinalInnerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicFinalInnerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicInnerInterface.kt") @TestMetadata("publicInnerInterface.kt")
public void testPublicInnerInterface() throws Exception { public void testPublicInnerInterface() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicInterface.kt") @TestMetadata("publicInterface.kt")
public void testPublicInterface() throws Exception { public void testPublicInterface() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicInterface.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicInterface.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -129,36 +129,36 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DeprecatedFlag extends AbstractWriteFlagsTest { public static class DeprecatedFlag extends AbstractWriteFlagsTest {
public void testAllFilesPresentInDeprecatedFlag() throws Exception { public void testAllFilesPresentInDeprecatedFlag() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("class.kt") @TestMetadata("class.kt")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/class.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/class.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classObject.kt") @TestMetadata("classObject.kt")
public void testClassObject() throws Exception { public void testClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enumClass.kt") @TestMetadata("enumClass.kt")
public void testEnumClass() throws Exception { public void testEnumClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClass.kt") @TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception { public void testInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("trait.kt") @TestMetadata("trait.kt")
public void testTrait() throws Exception { public void testTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/trait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/trait.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -168,7 +168,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Visibility extends AbstractWriteFlagsTest { public static class Visibility extends AbstractWriteFlagsTest {
public void testAllFilesPresentInVisibility() throws Exception { public void testAllFilesPresentInVisibility() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/class/visibility/internal") @TestMetadata("compiler/testData/writeFlags/class/visibility/internal")
@@ -176,54 +176,54 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Internal extends AbstractWriteFlagsTest { public static class Internal extends AbstractWriteFlagsTest {
public void testAllFilesPresentInInternal() throws Exception { public void testAllFilesPresentInInternal() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/internal"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/internal"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("class.kt") @TestMetadata("class.kt")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/class.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/class.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enum.kt") @TestMetadata("enum.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/enum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/enum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClass.kt") @TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception { public void testInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerEnum.kt") @TestMetadata("innerEnum.kt")
public void testInnerEnum() throws Exception { public void testInnerEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject() throws Exception { public void testInnerObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerTrait.kt") @TestMetadata("innerTrait.kt")
public void testInnerTrait() throws Exception { public void testInnerTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("object.kt") @TestMetadata("object.kt")
public void testObject() throws Exception { public void testObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/object.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/object.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("trait.kt") @TestMetadata("trait.kt")
public void testTrait() throws Exception { public void testTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/trait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/trait.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -233,54 +233,54 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Private extends AbstractWriteFlagsTest { public static class Private extends AbstractWriteFlagsTest {
public void testAllFilesPresentInPrivate() throws Exception { public void testAllFilesPresentInPrivate() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/private"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/private"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("class.kt") @TestMetadata("class.kt")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/class.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/class.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enum.kt") @TestMetadata("enum.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/enum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/enum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClass.kt") @TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception { public void testInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerEnum.kt") @TestMetadata("innerEnum.kt")
public void testInnerEnum() throws Exception { public void testInnerEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerEnum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerEnum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject() throws Exception { public void testInnerObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerTrait.kt") @TestMetadata("innerTrait.kt")
public void testInnerTrait() throws Exception { public void testInnerTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerTrait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerTrait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("object.kt") @TestMetadata("object.kt")
public void testObject() throws Exception { public void testObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/object.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/object.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("trait.kt") @TestMetadata("trait.kt")
public void testTrait() throws Exception { public void testTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/trait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/trait.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -290,54 +290,54 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Public extends AbstractWriteFlagsTest { public static class Public extends AbstractWriteFlagsTest {
public void testAllFilesPresentInPublic() throws Exception { public void testAllFilesPresentInPublic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/public"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/public"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("class.kt") @TestMetadata("class.kt")
public void testClass() throws Exception { public void testClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/class.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/class.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enum.kt") @TestMetadata("enum.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/enum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/enum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClass.kt") @TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception { public void testInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerEnum.kt") @TestMetadata("innerEnum.kt")
public void testInnerEnum() throws Exception { public void testInnerEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerEnum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerEnum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject() throws Exception { public void testInnerObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerTrait.kt") @TestMetadata("innerTrait.kt")
public void testInnerTrait() throws Exception { public void testInnerTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerTrait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerTrait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("object.kt") @TestMetadata("object.kt")
public void testObject() throws Exception { public void testObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/object.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/object.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("trait.kt") @TestMetadata("trait.kt")
public void testTrait() throws Exception { public void testTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/trait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/trait.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -349,7 +349,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DelegatedProperty extends AbstractWriteFlagsTest { public static class DelegatedProperty extends AbstractWriteFlagsTest {
public void testAllFilesPresentInDelegatedProperty() throws Exception { public void testAllFilesPresentInDelegatedProperty() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/delegatedProperty/visibility") @TestMetadata("compiler/testData/writeFlags/delegatedProperty/visibility")
@@ -357,12 +357,12 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Visibility extends AbstractWriteFlagsTest { public static class Visibility extends AbstractWriteFlagsTest {
public void testAllFilesPresentInVisibility() throws Exception { public void testAllFilesPresentInVisibility() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty/visibility"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty/visibility"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("privateSet.kt") @TestMetadata("privateSet.kt")
public void testPrivateSet() throws Exception { public void testPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/delegatedProperty/visibility/privateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/delegatedProperty/visibility/privateSet.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -373,7 +373,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Function extends AbstractWriteFlagsTest { public static class Function extends AbstractWriteFlagsTest {
public void testAllFilesPresentInFunction() throws Exception { public void testAllFilesPresentInFunction() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/function/classObjectPrivate") @TestMetadata("compiler/testData/writeFlags/function/classObjectPrivate")
@@ -381,24 +381,24 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassObjectPrivate extends AbstractWriteFlagsTest { public static class ClassObjectPrivate extends AbstractWriteFlagsTest {
public void testAllFilesPresentInClassObjectPrivate() throws Exception { public void testAllFilesPresentInClassObjectPrivate() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/classObjectPrivate"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/classObjectPrivate"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("privateFun.kt") @TestMetadata("privateFun.kt")
public void testPrivateFun() throws Exception { public void testPrivateFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateVal.kt") @TestMetadata("privateVal.kt")
public void testPrivateVal() throws Exception { public void testPrivateVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateVar.kt") @TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception { public void testPrivateVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -408,30 +408,30 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Constructors extends AbstractWriteFlagsTest { public static class Constructors extends AbstractWriteFlagsTest {
public void testAllFilesPresentInConstructors() throws Exception { public void testAllFilesPresentInConstructors() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/constructors"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/constructors"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("classObject.kt") @TestMetadata("classObject.kt")
public void testClassObject() throws Exception { public void testClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/classObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/classObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("objectInClass.kt") @TestMetadata("objectInClass.kt")
public void testObjectInClass() throws Exception { public void testObjectInClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/objectInClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/objectInClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("objectLiteral.kt") @TestMetadata("objectLiteral.kt")
public void testObjectLiteral() throws Exception { public void testObjectLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/objectLiteral.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/objectLiteral.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelObject.kt") @TestMetadata("topLevelObject.kt")
public void testTopLevelObject() throws Exception { public void testTopLevelObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/topLevelObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/topLevelObject.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -441,78 +441,78 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DeprecatedFlag extends AbstractWriteFlagsTest { public static class DeprecatedFlag extends AbstractWriteFlagsTest {
public void testAllFilesPresentInDeprecatedFlag() throws Exception { public void testAllFilesPresentInDeprecatedFlag() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("emptyGetter.kt") @TestMetadata("emptyGetter.kt")
public void testEmptyGetter() throws Exception { public void testEmptyGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("emptySetter.kt") @TestMetadata("emptySetter.kt")
public void testEmptySetter() throws Exception { public void testEmptySetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extentionFun.kt") @TestMetadata("extentionFun.kt")
public void testExtentionFun() throws Exception { public void testExtentionFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("funInClass.kt") @TestMetadata("funInClass.kt")
public void testFunInClass() throws Exception { public void testFunInClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("funInClassObject.kt") @TestMetadata("funInClassObject.kt")
public void testFunInClassObject() throws Exception { public void testFunInClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("getter.kt") @TestMetadata("getter.kt")
public void testGetter() throws Exception { public void testGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("getterAnnotationOnProperty.kt") @TestMetadata("getterAnnotationOnProperty.kt")
public void testGetterAnnotationOnProperty() throws Exception { public void testGetterAnnotationOnProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("getterForPropertyInConstructor.kt") @TestMetadata("getterForPropertyInConstructor.kt")
public void testGetterForPropertyInConstructor() throws Exception { public void testGetterForPropertyInConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getterForPropertyInConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getterForPropertyInConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("setter.kt") @TestMetadata("setter.kt")
public void testSetter() throws Exception { public void testSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("setterAnnotationOnProperty.kt") @TestMetadata("setterAnnotationOnProperty.kt")
public void testSetterAnnotationOnProperty() throws Exception { public void testSetterAnnotationOnProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("setterForPropertyInConstructor.kt") @TestMetadata("setterForPropertyInConstructor.kt")
public void testSetterForPropertyInConstructor() throws Exception { public void testSetterForPropertyInConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setterForPropertyInConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setterForPropertyInConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelFun.kt") @TestMetadata("topLevelFun.kt")
public void testTopLevelFun() throws Exception { public void testTopLevelFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -523,24 +523,24 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Hidden extends AbstractWriteFlagsTest { public static class Hidden extends AbstractWriteFlagsTest {
public void testAllFilesPresentInHidden() throws Exception { public void testAllFilesPresentInHidden() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/hidden"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/hidden"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("function.kt") @TestMetadata("function.kt")
public void testFunction() throws Exception { public void testFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/function.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/function.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyGetter.kt") @TestMetadata("propertyGetter.kt")
public void testPropertyGetter() throws Exception { public void testPropertyGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/propertyGetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/propertyGetter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertySetter.kt") @TestMetadata("propertySetter.kt")
public void testPropertySetter() throws Exception { public void testPropertySetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/propertySetter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/propertySetter.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -550,7 +550,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class InnerClass extends AbstractWriteFlagsTest { public static class InnerClass extends AbstractWriteFlagsTest {
public void testAllFilesPresentInInnerClass() throws Exception { public void testAllFilesPresentInInnerClass() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/innerClass/visibility") @TestMetadata("compiler/testData/writeFlags/innerClass/visibility")
@@ -558,42 +558,42 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Visibility extends AbstractWriteFlagsTest { public static class Visibility extends AbstractWriteFlagsTest {
public void testAllFilesPresentInVisibility() throws Exception { public void testAllFilesPresentInVisibility() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass/visibility"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass/visibility"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("internal.kt") @TestMetadata("internal.kt")
public void testInternal() throws Exception { public void testInternal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/internal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/internal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalClassObject.kt") @TestMetadata("internalClassObject.kt")
public void testInternalClassObject() throws Exception { public void testInternalClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("private.kt") @TestMetadata("private.kt")
public void testPrivate() throws Exception { public void testPrivate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/private.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/private.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateClassObject.kt") @TestMetadata("privateClassObject.kt")
public void testPrivateClassObject() throws Exception { public void testPrivateClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("public.kt") @TestMetadata("public.kt")
public void testPublic() throws Exception { public void testPublic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/public.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/public.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicClassObject.kt") @TestMetadata("publicClassObject.kt")
public void testPublicClassObject() throws Exception { public void testPublicClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -604,7 +604,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Property extends AbstractWriteFlagsTest { public static class Property extends AbstractWriteFlagsTest {
public void testAllFilesPresentInProperty() throws Exception { public void testAllFilesPresentInProperty() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/property/classObject") @TestMetadata("compiler/testData/writeFlags/property/classObject")
@@ -612,7 +612,7 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ClassObject extends AbstractWriteFlagsTest { public static class ClassObject extends AbstractWriteFlagsTest {
public void testAllFilesPresentInClassObject() throws Exception { public void testAllFilesPresentInClassObject() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/writeFlags/property/classObject/class") @TestMetadata("compiler/testData/writeFlags/property/classObject/class")
@@ -620,108 +620,108 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Class extends AbstractWriteFlagsTest { public static class Class extends AbstractWriteFlagsTest {
public void testAllFilesPresentInClass() throws Exception { public void testAllFilesPresentInClass() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/class"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/class"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("delegatedProtectedVar.kt") @TestMetadata("delegatedProtectedVar.kt")
public void testDelegatedProtectedVar() throws Exception { public void testDelegatedProtectedVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegatedPublicVal.kt") @TestMetadata("delegatedPublicVal.kt")
public void testDelegatedPublicVal() throws Exception { public void testDelegatedPublicVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalVal.kt") @TestMetadata("internalVal.kt")
public void testInternalVal() throws Exception { public void testInternalVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalVar.kt") @TestMetadata("internalVar.kt")
public void testInternalVar() throws Exception { public void testInternalVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalVarPrivateSet.kt") @TestMetadata("internalVarPrivateSet.kt")
public void testInternalVarPrivateSet() throws Exception { public void testInternalVarPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noBackingField.kt") @TestMetadata("noBackingField.kt")
public void testNoBackingField() throws Exception { public void testNoBackingField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/noBackingField.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/noBackingField.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateVal.kt") @TestMetadata("privateVal.kt")
public void testPrivateVal() throws Exception { public void testPrivateVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/privateVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/privateVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateVar.kt") @TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception { public void testPrivateVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/privateVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/privateVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("protectedVal.kt") @TestMetadata("protectedVal.kt")
public void testProtectedVal() throws Exception { public void testProtectedVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/protectedVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/protectedVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("protectedVarPrivateSet.kt") @TestMetadata("protectedVarPrivateSet.kt")
public void testProtectedVarPrivateSet() throws Exception { public void testProtectedVarPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVal.kt") @TestMetadata("publicVal.kt")
public void testPublicVal() throws Exception { public void testPublicVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicValNonDefault.kt") @TestMetadata("publicValNonDefault.kt")
public void testPublicValNonDefault() throws Exception { public void testPublicValNonDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVar.kt") @TestMetadata("publicVar.kt")
public void testPublicVar() throws Exception { public void testPublicVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarNonDefault.kt") @TestMetadata("publicVarNonDefault.kt")
public void testPublicVarNonDefault() throws Exception { public void testPublicVarNonDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarPrivateSet.kt") @TestMetadata("publicVarPrivateSet.kt")
public void testPublicVarPrivateSet() throws Exception { public void testPublicVarPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarProtectedSet.kt") @TestMetadata("publicVarProtectedSet.kt")
public void testPublicVarProtectedSet() throws Exception { public void testPublicVarProtectedSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarPublicSet.kt") @TestMetadata("publicVarPublicSet.kt")
public void testPublicVarPublicSet() throws Exception { public void testPublicVarPublicSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -731,30 +731,30 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Rename extends AbstractWriteFlagsTest { public static class Rename extends AbstractWriteFlagsTest {
public void testAllFilesPresentInRename() throws Exception { public void testAllFilesPresentInRename() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/rename"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/rename"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("constructorAndClassObject.kt") @TestMetadata("constructorAndClassObject.kt")
public void testConstructorAndClassObject() throws Exception { public void testConstructorAndClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegatedAndDelegated.kt") @TestMetadata("delegatedAndDelegated.kt")
public void testDelegatedAndDelegated() throws Exception { public void testDelegatedAndDelegated() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegatedAndProperty.kt") @TestMetadata("delegatedAndProperty.kt")
public void testDelegatedAndProperty() throws Exception { public void testDelegatedAndProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("propertyAndProperty.kt") @TestMetadata("propertyAndProperty.kt")
public void testPropertyAndProperty() throws Exception { public void testPropertyAndProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -764,120 +764,120 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Trait extends AbstractWriteFlagsTest { public static class Trait extends AbstractWriteFlagsTest {
public void testAllFilesPresentInTrait() throws Exception { public void testAllFilesPresentInTrait() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/trait"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/trait"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("delegatedProtectedVar.kt") @TestMetadata("delegatedProtectedVar.kt")
public void testDelegatedProtectedVar() throws Exception { public void testDelegatedProtectedVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegatedPublicVal.kt") @TestMetadata("delegatedPublicVal.kt")
public void testDelegatedPublicVal() throws Exception { public void testDelegatedPublicVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalConstVal.kt") @TestMetadata("internalConstVal.kt")
public void testInternalConstVal() throws Exception { public void testInternalConstVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalVal.kt") @TestMetadata("internalVal.kt")
public void testInternalVal() throws Exception { public void testInternalVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalVar.kt") @TestMetadata("internalVar.kt")
public void testInternalVar() throws Exception { public void testInternalVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalVarPrivateSet.kt") @TestMetadata("internalVarPrivateSet.kt")
public void testInternalVarPrivateSet() throws Exception { public void testInternalVarPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noBackingField.kt") @TestMetadata("noBackingField.kt")
public void testNoBackingField() throws Exception { public void testNoBackingField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateVal.kt") @TestMetadata("privateVal.kt")
public void testPrivateVal() throws Exception { public void testPrivateVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/privateVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/privateVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("privateVar.kt") @TestMetadata("privateVar.kt")
public void testPrivateVar() throws Exception { public void testPrivateVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/privateVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/privateVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("protectedVal.kt") @TestMetadata("protectedVal.kt")
public void testProtectedVal() throws Exception { public void testProtectedVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("protectedVarPrivateSet.kt") @TestMetadata("protectedVarPrivateSet.kt")
public void testProtectedVarPrivateSet() throws Exception { public void testProtectedVarPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicConstVal.kt") @TestMetadata("publicConstVal.kt")
public void testPublicConstVal() throws Exception { public void testPublicConstVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVal.kt") @TestMetadata("publicVal.kt")
public void testPublicVal() throws Exception { public void testPublicVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicValNonDefault.kt") @TestMetadata("publicValNonDefault.kt")
public void testPublicValNonDefault() throws Exception { public void testPublicValNonDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVar.kt") @TestMetadata("publicVar.kt")
public void testPublicVar() throws Exception { public void testPublicVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarNonDefault.kt") @TestMetadata("publicVarNonDefault.kt")
public void testPublicVarNonDefault() throws Exception { public void testPublicVarNonDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarPrivateSet.kt") @TestMetadata("publicVarPrivateSet.kt")
public void testPublicVarPrivateSet() throws Exception { public void testPublicVarPrivateSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarProtectedSet.kt") @TestMetadata("publicVarProtectedSet.kt")
public void testPublicVarProtectedSet() throws Exception { public void testPublicVarProtectedSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("publicVarPublicSet.kt") @TestMetadata("publicVarPublicSet.kt")
public void testPublicVarPublicSet() throws Exception { public void testPublicVarPublicSet() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -888,18 +888,18 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DeprecatedFlag extends AbstractWriteFlagsTest { public static class DeprecatedFlag extends AbstractWriteFlagsTest {
public void testAllFilesPresentInDeprecatedFlag() throws Exception { public void testAllFilesPresentInDeprecatedFlag() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("propertyInClass.kt") @TestMetadata("propertyInClass.kt")
public void testPropertyInClass() throws Exception { public void testPropertyInClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("topLevelProperty.kt") @TestMetadata("topLevelProperty.kt")
public void testTopLevelProperty() throws Exception { public void testTopLevelProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -909,24 +909,24 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Visibility extends AbstractWriteFlagsTest { public static class Visibility extends AbstractWriteFlagsTest {
public void testAllFilesPresentInVisibility() throws Exception { public void testAllFilesPresentInVisibility() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/visibility"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/visibility"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("internal.kt") @TestMetadata("internal.kt")
public void testInternal() throws Exception { public void testInternal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/internal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/internal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("private.kt") @TestMetadata("private.kt")
public void testPrivate() throws Exception { public void testPrivate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/private.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/private.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("public.kt") @TestMetadata("public.kt")
public void testPublic() throws Exception { public void testPublic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/public.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/public.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -35,7 +35,7 @@ import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider; import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.InTextDirectivesUtils; import org.jetbrains.kotlin.test.InTextDirectivesUtils;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
@@ -71,7 +71,7 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
FilesKt.readText(new File(filename), Charsets.UTF_8), "NO_KOTLIN_REFLECT" FilesKt.readText(new File(filename), Charsets.UTF_8), "NO_KOTLIN_REFLECT"
) ? ConfigurationKind.NO_KOTLIN_REFLECT : ConfigurationKind.ALL; ) ? ConfigurationKind.NO_KOTLIN_REFLECT : ConfigurationKind.ALL;
myEnvironment = JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea( myEnvironment = KotlinTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
getTestRootDisposable(), configurationKind, getTestJdkKind(filename) getTestRootDisposable(), configurationKind, getTestJdkKind(filename)
); );
@@ -118,8 +118,8 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
myEnvironment = KotlinCoreEnvironment.createForTests( myEnvironment = KotlinCoreEnvironment.createForTests(
getTestRootDisposable(), getTestRootDisposable(),
JetTestUtils.compilerConfigurationForTests( KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.ALL, getTestJdkKind(ktFileFullPath), JetTestUtils.getAnnotationsJar(), javaClassesTempDirectory ConfigurationKind.ALL, getTestJdkKind(ktFileFullPath), KotlinTestUtils.getAnnotationsJar(), javaClassesTempDirectory
), ),
EnvironmentConfigFiles.JVM_CONFIG_FILES EnvironmentConfigFiles.JVM_CONFIG_FILES
); );
@@ -147,8 +147,8 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
} }
}); });
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, JetTestUtils.getAnnotationsJar() ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, KotlinTestUtils.getAnnotationsJar()
); );
JvmContentRootsKt.addJavaSourceRoot(configuration, dirFile); JvmContentRootsKt.addJavaSourceRoot(configuration, dirFile);
myEnvironment = KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); myEnvironment = KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
@@ -156,7 +156,7 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
classFileFactory = classFileFactory =
GenerationUtils.compileManyFilesGetGenerationStateForTest(myEnvironment.getProject(), myFiles.getPsiFiles(), GenerationUtils.compileManyFilesGetGenerationStateForTest(myEnvironment.getProject(), myFiles.getPsiFiles(),
new JvmPackagePartProvider(myEnvironment)).getFactory(); new JvmPackagePartProvider(myEnvironment)).getFactory();
File kotlinOut = JetTestUtils.tmpDir(toString()); File kotlinOut = KotlinTestUtils.tmpDir(toString());
OutputUtilsKt.writeAllTo(classFileFactory, kotlinOut); OutputUtilsKt.writeAllTo(classFileFactory, kotlinOut);
List<String> javacOptions = new ArrayList<String>(0); List<String> javacOptions = new ArrayList<String>(0);
File diff suppressed because it is too large Load Diff
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.generated;
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;
@@ -33,113 +33,113 @@ import java.util.regex.Pattern;
public class BlackBoxMultiFileCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public class BlackBoxMultiFileCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
@TestMetadata("accessorForProtected") @TestMetadata("accessorForProtected")
public void testAccessorForProtected() throws Exception { public void testAccessorForProtected() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/accessorForProtected/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/accessorForProtected/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("accessorForProtectedInvokeVirtual") @TestMetadata("accessorForProtectedInvokeVirtual")
public void testAccessorForProtectedInvokeVirtual() throws Exception { public void testAccessorForProtectedInvokeVirtual() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/accessorForProtectedInvokeVirtual/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
public void testAllFilesPresentInBoxMultiFile() throws Exception { public void testAllFilesPresentInBoxMultiFile() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultiFile"), Pattern.compile("^([^\\.]+)$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultiFile"), Pattern.compile("^([^\\.]+)$"), false);
} }
@TestMetadata("callMultifileClassMemberFromOtherPackage") @TestMetadata("callMultifileClassMemberFromOtherPackage")
public void testCallMultifileClassMemberFromOtherPackage() throws Exception { public void testCallMultifileClassMemberFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/callMultifileClassMemberFromOtherPackage/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/callMultifileClassMemberFromOtherPackage/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("inlineMultifileClassMemberFromOtherPackage") @TestMetadata("inlineMultifileClassMemberFromOtherPackage")
public void testInlineMultifileClassMemberFromOtherPackage() throws Exception { public void testInlineMultifileClassMemberFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/inlineMultifileClassMemberFromOtherPackage/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/inlineMultifileClassMemberFromOtherPackage/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("internalVisibility") @TestMetadata("internalVisibility")
public void testInternalVisibility() throws Exception { public void testInternalVisibility() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/internalVisibility/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/internalVisibility/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("kt1515") @TestMetadata("kt1515")
public void testKt1515() throws Exception { public void testKt1515() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt1515/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt1515/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("kt1528") @TestMetadata("kt1528")
public void testKt1528() throws Exception { public void testKt1528() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt1528/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt1528/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("kt1845") @TestMetadata("kt1845")
public void testKt1845() throws Exception { public void testKt1845() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt1845/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt1845/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("kt2060") @TestMetadata("kt2060")
public void testKt2060() throws Exception { public void testKt2060() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt2060/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt2060/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("kt9717") @TestMetadata("kt9717")
public void testKt9717() throws Exception { public void testKt9717() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt9717/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt9717/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("kt9717DifferentPackages") @TestMetadata("kt9717DifferentPackages")
public void testKt9717DifferentPackages() throws Exception { public void testKt9717DifferentPackages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt9717DifferentPackages/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/kt9717DifferentPackages/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("mainInFiles") @TestMetadata("mainInFiles")
public void testMainInFiles() throws Exception { public void testMainInFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/mainInFiles/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/mainInFiles/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("multifileClassPartsInitialization") @TestMetadata("multifileClassPartsInitialization")
public void testMultifileClassPartsInitialization() throws Exception { public void testMultifileClassPartsInitialization() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/multifileClassPartsInitialization/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/multifileClassPartsInitialization/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("packageLocalClassNotImportedWithDefaultImport") @TestMetadata("packageLocalClassNotImportedWithDefaultImport")
public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception { public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/packageLocalClassNotImportedWithDefaultImport/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/packageLocalClassNotImportedWithDefaultImport/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("samWrappersDifferentFiles") @TestMetadata("samWrappersDifferentFiles")
public void testSamWrappersDifferentFiles() throws Exception { public void testSamWrappersDifferentFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/samWrappersDifferentFiles/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("sameFileName") @TestMetadata("sameFileName")
public void testSameFileName() throws Exception { public void testSameFileName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/sameFileName/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/sameFileName/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("samePartNameDifferentFacades") @TestMetadata("samePartNameDifferentFacades")
public void testSamePartNameDifferentFacades() throws Exception { public void testSamePartNameDifferentFacades() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/samePartNameDifferentFacades/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/samePartNameDifferentFacades/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
@TestMetadata("simple") @TestMetadata("simple")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/simple/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultiFile/simple/");
doTestMultiFile(fileName); doTestMultiFile(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.generated;
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,84 +32,84 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInBoxWithJava() throws Exception { public void testAllFilesPresentInBoxWithJava() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("annotatedSamFunExpression") @TestMetadata("annotatedSamFunExpression")
public void testAnnotatedSamFunExpression() throws Exception { public void testAnnotatedSamFunExpression() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedSamFunExpression/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedSamFunExpression/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("annotatedSamLambda") @TestMetadata("annotatedSamLambda")
public void testAnnotatedSamLambda() throws Exception { public void testAnnotatedSamLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedSamLambda/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedSamLambda/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("classCompanion") @TestMetadata("classCompanion")
public void testClassCompanion() throws Exception { public void testClassCompanion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/classCompanion/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/classCompanion/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("classObjectAccessor") @TestMetadata("classObjectAccessor")
public void testClassObjectAccessor() throws Exception { public void testClassObjectAccessor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/classObjectAccessor/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/classObjectAccessor/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("deprecatedFieldForObject") @TestMetadata("deprecatedFieldForObject")
public void testDeprecatedFieldForObject() throws Exception { public void testDeprecatedFieldForObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/deprecatedFieldForObject/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/deprecatedFieldForObject/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("inline") @TestMetadata("inline")
public void testInline() throws Exception { public void testInline() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/inline/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/inline/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("innerClass") @TestMetadata("innerClass")
public void testInnerClass() throws Exception { public void testInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/innerClass/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/innerClass/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("interfaceCompanion") @TestMetadata("interfaceCompanion")
public void testInterfaceCompanion() throws Exception { public void testInterfaceCompanion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaceCompanion/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaceCompanion/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("interfaceDefaultImpls") @TestMetadata("interfaceDefaultImpls")
public void testInterfaceDefaultImpls() throws Exception { public void testInterfaceDefaultImpls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaceDefaultImpls/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaceDefaultImpls/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("jvmName") @TestMetadata("jvmName")
public void testJvmName() throws Exception { public void testJvmName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmName/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmName/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("mangling") @TestMetadata("mangling")
public void testMangling() throws Exception { public void testMangling() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/mangling/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/mangling/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("number") @TestMetadata("number")
public void testNumber() throws Exception { public void testNumber() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/number/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/number/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("protectedInInline") @TestMetadata("protectedInInline")
public void testProtectedInInline() throws Exception { public void testProtectedInInline() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/protectedInInline/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/protectedInInline/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -118,12 +118,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class AnnotatedFileClasses extends AbstractBlackBoxCodegenTest { public static class AnnotatedFileClasses extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInAnnotatedFileClasses() throws Exception { public void testAllFilesPresentInAnnotatedFileClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/annotatedFileClasses"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/annotatedFileClasses"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("javaAnnotationOnFileFacade") @TestMetadata("javaAnnotationOnFileFacade")
public void testJavaAnnotationOnFileFacade() throws Exception { public void testJavaAnnotationOnFileFacade() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotatedFileClasses/javaAnnotationOnFileFacade/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -134,24 +134,24 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class AnnotationsWithKClass extends AbstractBlackBoxCodegenTest { public static class AnnotationsWithKClass extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInAnnotationsWithKClass() throws Exception { public void testAllFilesPresentInAnnotationsWithKClass() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/annotationsWithKClass"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/annotationsWithKClass"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("array") @TestMetadata("array")
public void testArray() throws Exception { public void testArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass/array/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass/array/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("basic") @TestMetadata("basic")
public void testBasic() throws Exception { public void testBasic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("vararg") @TestMetadata("vararg")
public void testVararg() throws Exception { public void testVararg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass/vararg/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/annotationsWithKClass/vararg/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -162,24 +162,24 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class BuiltinStubMethods extends AbstractBlackBoxCodegenTest { public static class BuiltinStubMethods extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInBuiltinStubMethods() throws Exception { public void testAllFilesPresentInBuiltinStubMethods() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/builtinStubMethods"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/builtinStubMethods"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("extendJavaCollections") @TestMetadata("extendJavaCollections")
public void testExtendJavaCollections() throws Exception { public void testExtendJavaCollections() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/builtinStubMethods/extendJavaCollections/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/builtinStubMethods/extendJavaCollections/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("substitutedIterable") @TestMetadata("substitutedIterable")
public void testSubstitutedIterable() throws Exception { public void testSubstitutedIterable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("substitutedList") @TestMetadata("substitutedList")
public void testSubstitutedList() throws Exception { public void testSubstitutedList() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedList/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedList/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -190,12 +190,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Casts extends AbstractBlackBoxCodegenTest { public static class Casts extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInCasts() throws Exception { public void testAllFilesPresentInCasts() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/casts"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/casts"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("javaTypeIsFunK") @TestMetadata("javaTypeIsFunK")
public void testJavaTypeIsFunK() throws Exception { public void testJavaTypeIsFunK() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/casts/javaTypeIsFunK/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/casts/javaTypeIsFunK/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -206,84 +206,84 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Collections extends AbstractBlackBoxCodegenTest { public static class Collections extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInCollections() throws Exception { public void testAllFilesPresentInCollections() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/collections"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/collections"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("charSequence") @TestMetadata("charSequence")
public void testCharSequence() throws Exception { public void testCharSequence() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/charSequence/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/charSequence/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("implementCollectionThroughKotlin") @TestMetadata("implementCollectionThroughKotlin")
public void testImplementCollectionThroughKotlin() throws Exception { public void testImplementCollectionThroughKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/implementCollectionThroughKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/implementCollectionThroughKotlin/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantImplCharSequence") @TestMetadata("irrelevantImplCharSequence")
public void testIrrelevantImplCharSequence() throws Exception { public void testIrrelevantImplCharSequence() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplCharSequence/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplCharSequence/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantImplCharSequenceKotlin") @TestMetadata("irrelevantImplCharSequenceKotlin")
public void testIrrelevantImplCharSequenceKotlin() throws Exception { public void testIrrelevantImplCharSequenceKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplCharSequenceKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplCharSequenceKotlin/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantImplMutableList") @TestMetadata("irrelevantImplMutableList")
public void testIrrelevantImplMutableList() throws Exception { public void testIrrelevantImplMutableList() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableList/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableList/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantImplMutableListKotlin") @TestMetadata("irrelevantImplMutableListKotlin")
public void testIrrelevantImplMutableListKotlin() throws Exception { public void testIrrelevantImplMutableListKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListKotlin/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantImplMutableListSubstitution") @TestMetadata("irrelevantImplMutableListSubstitution")
public void testIrrelevantImplMutableListSubstitution() throws Exception { public void testIrrelevantImplMutableListSubstitution() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListSubstitution/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantImplMutableListSubstitution/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantRemoveAtOverrideInJava") @TestMetadata("irrelevantRemoveAtOverrideInJava")
public void testIrrelevantRemoveAtOverrideInJava() throws Exception { public void testIrrelevantRemoveAtOverrideInJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantRemoveAtOverrideInJava/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantRemoveAtOverrideInJava/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("irrelevantSizeOverrideInJava") @TestMetadata("irrelevantSizeOverrideInJava")
public void testIrrelevantSizeOverrideInJava() throws Exception { public void testIrrelevantSizeOverrideInJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantSizeOverrideInJava/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/irrelevantSizeOverrideInJava/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("mutableList") @TestMetadata("mutableList")
public void testMutableList() throws Exception { public void testMutableList() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/mutableList/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/mutableList/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("platformValueContains") @TestMetadata("platformValueContains")
public void testPlatformValueContains() throws Exception { public void testPlatformValueContains() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/platformValueContains/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/platformValueContains/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("removeAtInt") @TestMetadata("removeAtInt")
public void testRemoveAtInt() throws Exception { public void testRemoveAtInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/removeAtInt/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/removeAtInt/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("strList") @TestMetadata("strList")
public void testStrList() throws Exception { public void testStrList() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/strList/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/collections/strList/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -294,36 +294,36 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class FileClasses extends AbstractBlackBoxCodegenTest { public static class FileClasses extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInFileClasses() throws Exception { public void testAllFilesPresentInFileClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/fileClasses"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/fileClasses"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("differentFiles") @TestMetadata("differentFiles")
public void testDifferentFiles() throws Exception { public void testDifferentFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/differentFiles/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/differentFiles/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("multifileClassWith2Files") @TestMetadata("multifileClassWith2Files")
public void testMultifileClassWith2Files() throws Exception { public void testMultifileClassWith2Files() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWith2Files/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWith2Files/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("multifileClassWithCrossCall") @TestMetadata("multifileClassWithCrossCall")
public void testMultifileClassWithCrossCall() throws Exception { public void testMultifileClassWithCrossCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithCrossCall/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithCrossCall/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("multifileClassWithPrivate") @TestMetadata("multifileClassWithPrivate")
public void testMultifileClassWithPrivate() throws Exception { public void testMultifileClassWithPrivate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithPrivate/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/multifileClassWithPrivate/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("simple") @TestMetadata("simple")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/simple/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/fileClasses/simple/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -335,17 +335,17 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
public static class Interfaces extends AbstractBlackBoxCodegenTest { public static class Interfaces extends AbstractBlackBoxCodegenTest {
@TestMetadata("abstractClassInheritsFromInterface") @TestMetadata("abstractClassInheritsFromInterface")
public void testAbstractClassInheritsFromInterface() throws Exception { public void testAbstractClassInheritsFromInterface() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaces/abstractClassInheritsFromInterface/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaces/abstractClassInheritsFromInterface/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
public void testAllFilesPresentInInterfaces() throws Exception { public void testAllFilesPresentInInterfaces() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/interfaces"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/interfaces"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("inheritJavaInterface") @TestMetadata("inheritJavaInterface")
public void testInheritJavaInterface() throws Exception { public void testInheritJavaInterface() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaces/inheritJavaInterface/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/interfaces/inheritJavaInterface/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -356,12 +356,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class JvmField extends AbstractBlackBoxCodegenTest { public static class JvmField extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInJvmField() throws Exception { public void testAllFilesPresentInJvmField() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/jvmField"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/jvmField"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("simple") @TestMetadata("simple")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmField/simple/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmField/simple/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -372,18 +372,18 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class JvmOverloads extends AbstractBlackBoxCodegenTest { public static class JvmOverloads extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInJvmOverloads() throws Exception { public void testAllFilesPresentInJvmOverloads() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/jvmOverloads"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/jvmOverloads"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("generics") @TestMetadata("generics")
public void testGenerics() throws Exception { public void testGenerics() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmOverloads/generics/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmOverloads/generics/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("simple") @TestMetadata("simple")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmOverloads/simple/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmOverloads/simple/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -394,30 +394,30 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class JvmStatic extends AbstractBlackBoxCodegenTest { public static class JvmStatic extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInJvmStatic() throws Exception { public void testAllFilesPresentInJvmStatic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/jvmStatic"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/jvmStatic"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("annotations") @TestMetadata("annotations")
public void testAnnotations() throws Exception { public void testAnnotations() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/annotations/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/annotations/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("classObject") @TestMetadata("classObject")
public void testClassObject() throws Exception { public void testClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/classObject/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/classObject/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("enumCompanion") @TestMetadata("enumCompanion")
public void testEnumCompanion() throws Exception { public void testEnumCompanion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/enumCompanion/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/enumCompanion/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("object") @TestMetadata("object")
public void testObject() throws Exception { public void testObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/object/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/jvmStatic/object/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -428,12 +428,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class NotNullAssertions extends AbstractBlackBoxCodegenTest { public static class NotNullAssertions extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInNotNullAssertions() throws Exception { public void testAllFilesPresentInNotNullAssertions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/notNullAssertions"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/notNullAssertions"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("extensionReceiverParameter") @TestMetadata("extensionReceiverParameter")
public void testExtensionReceiverParameter() throws Exception { public void testExtensionReceiverParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/notNullAssertions/extensionReceiverParameter/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/notNullAssertions/extensionReceiverParameter/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -444,42 +444,42 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Properties extends AbstractBlackBoxCodegenTest { public static class Properties extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInProperties() throws Exception { public void testAllFilesPresentInProperties() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/properties"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/properties"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("annotationWithKotlinProperty") @TestMetadata("annotationWithKotlinProperty")
public void testAnnotationWithKotlinProperty() throws Exception { public void testAnnotationWithKotlinProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinProperty/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinProperty/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("annotationWithKotlinPropertyFromInterfaceCompanion") @TestMetadata("annotationWithKotlinPropertyFromInterfaceCompanion")
public void testAnnotationWithKotlinPropertyFromInterfaceCompanion() throws Exception { public void testAnnotationWithKotlinPropertyFromInterfaceCompanion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinPropertyFromInterfaceCompanion/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/annotationWithKotlinPropertyFromInterfaceCompanion/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("classObjectProperties") @TestMetadata("classObjectProperties")
public void testClassObjectProperties() throws Exception { public void testClassObjectProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/classObjectProperties/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/classObjectProperties/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("collectionSize") @TestMetadata("collectionSize")
public void testCollectionSize() throws Exception { public void testCollectionSize() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/collectionSize/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/collectionSize/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("commonProperties") @TestMetadata("commonProperties")
public void testCommonProperties() throws Exception { public void testCommonProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/commonProperties/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/commonProperties/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("substituteJavaSuperField") @TestMetadata("substituteJavaSuperField")
public void testSubstituteJavaSuperField() throws Exception { public void testSubstituteJavaSuperField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/substituteJavaSuperField/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/properties/substituteJavaSuperField/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -490,120 +490,120 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Reflection extends AbstractBlackBoxCodegenTest { public static class Reflection extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInReflection() throws Exception { public void testAllFilesPresentInReflection() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("callInstanceJavaMethod") @TestMetadata("callInstanceJavaMethod")
public void testCallInstanceJavaMethod() throws Exception { public void testCallInstanceJavaMethod() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/callInstanceJavaMethod/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/callInstanceJavaMethod/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("callPrivateJavaMethod") @TestMetadata("callPrivateJavaMethod")
public void testCallPrivateJavaMethod() throws Exception { public void testCallPrivateJavaMethod() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/callPrivateJavaMethod/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/callPrivateJavaMethod/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("callStaticJavaMethod") @TestMetadata("callStaticJavaMethod")
public void testCallStaticJavaMethod() throws Exception { public void testCallStaticJavaMethod() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("declaredVsInheritedFunctions") @TestMetadata("declaredVsInheritedFunctions")
public void testDeclaredVsInheritedFunctions() throws Exception { public void testDeclaredVsInheritedFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedFunctions/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedFunctions/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("declaredVsInheritedProperties") @TestMetadata("declaredVsInheritedProperties")
public void testDeclaredVsInheritedProperties() throws Exception { public void testDeclaredVsInheritedProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedProperties/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/declaredVsInheritedProperties/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("functionReferenceErasedToKFunction") @TestMetadata("functionReferenceErasedToKFunction")
public void testFunctionReferenceErasedToKFunction() throws Exception { public void testFunctionReferenceErasedToKFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("javaClassGetFunctions") @TestMetadata("javaClassGetFunctions")
public void testJavaClassGetFunctions() throws Exception { public void testJavaClassGetFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("javaMethodsSmokeTest") @TestMetadata("javaMethodsSmokeTest")
public void testJavaMethodsSmokeTest() throws Exception { public void testJavaMethodsSmokeTest() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaMethodsSmokeTest/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaMethodsSmokeTest/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("javaPropertyInheritedInKotlin") @TestMetadata("javaPropertyInheritedInKotlin")
public void testJavaPropertyInheritedInKotlin() throws Exception { public void testJavaPropertyInheritedInKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaPropertyInheritedInKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaPropertyInheritedInKotlin/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("javaStaticField") @TestMetadata("javaStaticField")
public void testJavaStaticField() throws Exception { public void testJavaStaticField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaStaticField/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaStaticField/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("kotlinPropertyInheritedInJava") @TestMetadata("kotlinPropertyInheritedInJava")
public void testKotlinPropertyInheritedInJava() throws Exception { public void testKotlinPropertyInheritedInJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("mutatePrivateJavaInstanceField") @TestMetadata("mutatePrivateJavaInstanceField")
public void testMutatePrivateJavaInstanceField() throws Exception { public void testMutatePrivateJavaInstanceField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaInstanceField/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaInstanceField/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("mutatePrivateJavaStaticField") @TestMetadata("mutatePrivateJavaStaticField")
public void testMutatePrivateJavaStaticField() throws Exception { public void testMutatePrivateJavaStaticField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaStaticField/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/mutatePrivateJavaStaticField/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("nestedClasses") @TestMetadata("nestedClasses")
public void testNestedClasses() throws Exception { public void testNestedClasses() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/nestedClasses/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/nestedClasses/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("noConflictOnKotlinGetterAndJavaField") @TestMetadata("noConflictOnKotlinGetterAndJavaField")
public void testNoConflictOnKotlinGetterAndJavaField() throws Exception { public void testNoConflictOnKotlinGetterAndJavaField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/noConflictOnKotlinGetterAndJavaField/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/noConflictOnKotlinGetterAndJavaField/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("parametersHaveNoNames") @TestMetadata("parametersHaveNoNames")
public void testParametersHaveNoNames() throws Exception { public void testParametersHaveNoNames() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/parametersHaveNoNames/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/parametersHaveNoNames/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("platformTypeNotEqualToKotlinType") @TestMetadata("platformTypeNotEqualToKotlinType")
public void testPlatformTypeNotEqualToKotlinType() throws Exception { public void testPlatformTypeNotEqualToKotlinType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/platformTypeNotEqualToKotlinType/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/platformTypeNotEqualToKotlinType/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("platformTypeToString") @TestMetadata("platformTypeToString")
public void testPlatformTypeToString() throws Exception { public void testPlatformTypeToString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/platformTypeToString/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/platformTypeToString/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("referenceToJavaFieldOfKotlinSubclass") @TestMetadata("referenceToJavaFieldOfKotlinSubclass")
public void testReferenceToJavaFieldOfKotlinSubclass() throws Exception { public void testReferenceToJavaFieldOfKotlinSubclass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/referenceToJavaFieldOfKotlinSubclass/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/referenceToJavaFieldOfKotlinSubclass/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -614,30 +614,30 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class SecondaryConstructors extends AbstractBlackBoxCodegenTest { public static class SecondaryConstructors extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInSecondaryConstructors() throws Exception { public void testAllFilesPresentInSecondaryConstructors() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/secondaryConstructors"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/secondaryConstructors"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("withGenerics") @TestMetadata("withGenerics")
public void testWithGenerics() throws Exception { public void testWithGenerics() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withGenerics/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withGenerics/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("withPrimary") @TestMetadata("withPrimary")
public void testWithPrimary() throws Exception { public void testWithPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withPrimary/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withPrimary/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("withVarargs") @TestMetadata("withVarargs")
public void testWithVarargs() throws Exception { public void testWithVarargs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withVarargs/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withVarargs/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("withoutPrimary") @TestMetadata("withoutPrimary")
public void testWithoutPrimary() throws Exception { public void testWithoutPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withoutPrimary/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/secondaryConstructors/withoutPrimary/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -648,42 +648,42 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Statics extends AbstractBlackBoxCodegenTest { public static class Statics extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInStatics() throws Exception { public void testAllFilesPresentInStatics() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/statics"), Pattern.compile("^([^\\.]+)$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/statics"), Pattern.compile("^([^\\.]+)$"), true);
} }
@TestMetadata("fields") @TestMetadata("fields")
public void testFields() throws Exception { public void testFields() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/fields/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/fields/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("functions") @TestMetadata("functions")
public void testFunctions() throws Exception { public void testFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/functions/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/functions/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("hidePrivateByPublic") @TestMetadata("hidePrivateByPublic")
public void testHidePrivateByPublic() throws Exception { public void testHidePrivateByPublic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/hidePrivateByPublic/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/hidePrivateByPublic/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("protectedSamConstructor") @TestMetadata("protectedSamConstructor")
public void testProtectedSamConstructor() throws Exception { public void testProtectedSamConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/protectedSamConstructor/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/protectedSamConstructor/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("protectedStatic") @TestMetadata("protectedStatic")
public void testProtectedStatic() throws Exception { public void testProtectedStatic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/protectedStatic/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/protectedStatic/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@TestMetadata("protectedStatic2") @TestMetadata("protectedStatic2")
public void testProtectedStatic2() throws Exception { public void testProtectedStatic2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/protectedStatic2/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/statics/protectedStatic2/");
doTestWithJava(fileName); doTestWithJava(fileName);
} }
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.integration.KotlinIntegrationTestBase
import org.jetbrains.kotlin.rmi.* import org.jetbrains.kotlin.rmi.*
import org.jetbrains.kotlin.rmi.kotlinr.DaemonReportingTargets import org.jetbrains.kotlin.rmi.kotlinr.DaemonReportingTargets
import org.jetbrains.kotlin.rmi.kotlinr.KotlinCompilerClient import org.jetbrains.kotlin.rmi.kotlinr.KotlinCompilerClient
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
import java.io.File import java.io.File
import kotlin.concurrent.thread import kotlin.concurrent.thread
@@ -56,8 +56,8 @@ public class CompilerDaemonTest : KotlinIntegrationTestBase() {
TestCase.assertEquals("build results differ", CliBaseTest.removePerfOutput(res1.out), CliBaseTest.removePerfOutput(res2.out)) TestCase.assertEquals("build results differ", CliBaseTest.removePerfOutput(res1.out), CliBaseTest.removePerfOutput(res2.out))
} }
private fun getTestBaseDir(): String = JetTestUtils.getTestDataPathBase() + "/integration/smoke/" + getTestName(true) private fun getTestBaseDir(): String = KotlinTestUtils.getTestDataPathBase() + "/integration/smoke/" + getTestName(true)
private fun getHelloAppBaseDir(): String = JetTestUtils.getTestDataPathBase() + "/integration/smoke/helloApp" private fun getHelloAppBaseDir(): String = KotlinTestUtils.getTestDataPathBase() + "/integration/smoke/helloApp"
private fun run(logName: String, vararg args: String): Int = runJava(getTestBaseDir(), logName, *args) private fun run(logName: String, vararg args: String): Int = runJava(getTestBaseDir(), logName, *args)
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.js.test.rhino.RhinoFunctionResultChecker; import org.jetbrains.kotlin.js.test.rhino.RhinoFunctionResultChecker;
import org.jetbrains.kotlin.js.test.rhino.RhinoUtils; import org.jetbrains.kotlin.js.test.rhino.RhinoUtils;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@@ -36,7 +36,7 @@ public class AntTaskJsTest extends AbstractAntTaskTest {
@NotNull @NotNull
private String getTestDataDir() { private String getTestDataDir() {
return JetTestUtils.getTestDataPathBase() + "/integration/ant/js/" + getTestName(true); return KotlinTestUtils.getTestDataPathBase() + "/integration/ant/js/" + getTestName(true);
} }
@NotNull @NotNull
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.integration;
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;
@@ -33,101 +33,101 @@ import java.util.regex.Pattern;
public class AntTaskTestGenerated extends AbstractAntTaskTest { public class AntTaskTestGenerated extends AbstractAntTaskTest {
@TestMetadata("additionalArguments") @TestMetadata("additionalArguments")
public void testAdditionalArguments() throws Exception { public void testAdditionalArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/additionalArguments/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/additionalArguments/");
doTest(fileName); doTest(fileName);
} }
public void testAllFilesPresentInJvm() throws Exception { public void testAllFilesPresentInJvm() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/integration/ant/jvm"), Pattern.compile("^([^\\.]+)$"), false); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/integration/ant/jvm"), Pattern.compile("^([^\\.]+)$"), false);
} }
@TestMetadata("doNotFailOnError") @TestMetadata("doNotFailOnError")
public void testDoNotFailOnError() throws Exception { public void testDoNotFailOnError() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/doNotFailOnError/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/doNotFailOnError/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("failOnErrorByDefault") @TestMetadata("failOnErrorByDefault")
public void testFailOnErrorByDefault() throws Exception { public void testFailOnErrorByDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/failOnErrorByDefault/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/failOnErrorByDefault/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("helloWorld") @TestMetadata("helloWorld")
public void testHelloWorld() throws Exception { public void testHelloWorld() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/helloWorld/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/helloWorld/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("internalMembers") @TestMetadata("internalMembers")
public void testInternalMembers() throws Exception { public void testInternalMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/internalMembers/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/internalMembers/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("jvmClasspath") @TestMetadata("jvmClasspath")
public void testJvmClasspath() throws Exception { public void testJvmClasspath() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/jvmClasspath/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/jvmClasspath/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("mainInFiles") @TestMetadata("mainInFiles")
public void testMainInFiles() throws Exception { public void testMainInFiles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/mainInFiles/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/mainInFiles/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("moduleName") @TestMetadata("moduleName")
public void testModuleName() throws Exception { public void testModuleName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleName/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleName/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("moduleNameDefault") @TestMetadata("moduleNameDefault")
public void testModuleNameDefault() throws Exception { public void testModuleNameDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleNameDefault/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleNameDefault/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("moduleNameWithKotlin") @TestMetadata("moduleNameWithKotlin")
public void testModuleNameWithKotlin() throws Exception { public void testModuleNameWithKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleNameWithKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleNameWithKotlin/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noStdlibForJavac") @TestMetadata("noStdlibForJavac")
public void testNoStdlibForJavac() throws Exception { public void testNoStdlibForJavac() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/noStdlibForJavac/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/noStdlibForJavac/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("stdlibForJavacWithNoKotlin") @TestMetadata("stdlibForJavacWithNoKotlin")
public void testStdlibForJavacWithNoKotlin() throws Exception { public void testStdlibForJavacWithNoKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/stdlibForJavacWithNoKotlin/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/stdlibForJavacWithNoKotlin/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("suppressWarnings") @TestMetadata("suppressWarnings")
public void testSuppressWarnings() throws Exception { public void testSuppressWarnings() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/suppressWarnings/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/suppressWarnings/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("verbose") @TestMetadata("verbose")
public void testVerbose() throws Exception { public void testVerbose() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/verbose/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/verbose/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("version") @TestMetadata("version")
public void testVersion() throws Exception { public void testVersion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/version/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/version/");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("withKotlinNoJavaSources") @TestMetadata("withKotlinNoJavaSources")
public void testWithKotlinNoJavaSources() throws Exception { public void testWithKotlinNoJavaSources() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/");
doTest(fileName); doTest(fileName);
} }
} }
@@ -17,7 +17,7 @@
package org.jetbrains.kotlin.integration; package org.jetbrains.kotlin.integration;
import com.intellij.util.ArrayUtil; import com.intellij.util.ArrayUtil;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.utils.StringsKt; import org.jetbrains.kotlin.utils.StringsKt;
import java.io.File; import java.io.File;
@@ -28,7 +28,7 @@ import java.util.Collections;
public class CompilerSmokeTest extends KotlinIntegrationTestBase { public class CompilerSmokeTest extends KotlinIntegrationTestBase {
private int run(String logName, String... args) throws Exception { private int run(String logName, String... args) throws Exception {
return runJava(JetTestUtils.getTestDataPathBase() + "/integration/smoke/" + getTestName(true), logName, args); return runJava(KotlinTestUtils.getTestDataPathBase() + "/integration/smoke/" + getTestName(true), logName, args);
} }
private int runCompiler(String logName, String... arguments) throws Exception { private int runCompiler(String logName, String... arguments) throws Exception {
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.cli.CliBaseTest; import org.jetbrains.kotlin.cli.CliBaseTest;
import org.jetbrains.kotlin.cli.common.KotlinVersion; import org.jetbrains.kotlin.cli.common.KotlinVersion;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir; import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.kotlin.utils.PathUtil; import org.jetbrains.kotlin.utils.PathUtil;
@@ -93,7 +93,7 @@ public abstract class KotlinIntegrationTestBase extends TestCaseWithTmpdir {
File expectedFile = new File(testDataDir, baseName + ".expected"); File expectedFile = new File(testDataDir, baseName + ".expected");
String normalizedContent = normalizeOutput(new File(testDataDir), content); String normalizedContent = normalizeOutput(new File(testDataDir), content);
JetTestUtils.assertEqualsToFile(expectedFile, normalizedContent); KotlinTestUtils.assertEqualsToFile(expectedFile, normalizedContent);
} }
private static int runProcess(GeneralCommandLine commandLine, StringBuilder executionLog) throws ExecutionException { private static int runProcess(GeneralCommandLine commandLine, StringBuilder executionLog) throws ExecutionException {
@@ -40,7 +40,7 @@ import java.io.IOException;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.util.Collections; import java.util.Collections;
import static org.jetbrains.kotlin.test.JetTestUtils.*; import static org.jetbrains.kotlin.test.KotlinTestUtils.*;
import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.DONT_INCLUDE_METHODS_OF_OBJECT; import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.DONT_INCLUDE_METHODS_OF_OBJECT;
import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.validateAndCompareDescriptorWithFile; import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.validateAndCompareDescriptorWithFile;
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.load.kotlin.ModuleVisibilityManager;
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils; import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir; import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
@@ -52,8 +52,8 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends TestCaseWit
super.setUp(); super.setUp();
aDir = new File(tmpdir, "a"); aDir = new File(tmpdir, "a");
bDir = new File(tmpdir, "b"); bDir = new File(tmpdir, "b");
JetTestUtils.mkdirs(aDir); KotlinTestUtils.mkdirs(aDir);
JetTestUtils.mkdirs(bDir); KotlinTestUtils.mkdirs(bDir);
} }
public void doTest(@NotNull String fileName) throws Exception { public void doTest(@NotNull String fileName) throws Exception {
@@ -86,14 +86,14 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends TestCaseWit
} }
protected ClassFileFactory compileA(@NotNull File ktAFile) throws IOException { protected ClassFileFactory compileA(@NotNull File ktAFile) throws IOException {
KotlinCoreEnvironment jetCoreEnvironment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(getTestRootDisposable(), KotlinCoreEnvironment jetCoreEnvironment = KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(getTestRootDisposable(),
ConfigurationKind.ALL); ConfigurationKind.ALL);
return compileKotlin(ktAFile, aDir, jetCoreEnvironment, getTestRootDisposable()); return compileKotlin(ktAFile, aDir, jetCoreEnvironment, getTestRootDisposable());
} }
protected ClassFileFactory compileB(@NotNull File ktBFile) throws IOException { protected ClassFileFactory compileB(@NotNull File ktBFile) throws IOException {
CompilerConfiguration configurationWithADirInClasspath = JetTestUtils CompilerConfiguration configurationWithADirInClasspath = KotlinTestUtils
.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, JetTestUtils.getAnnotationsJar(), aDir); .compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, KotlinTestUtils.getAnnotationsJar(), aDir);
KotlinCoreEnvironment environment = KotlinCoreEnvironment environment =
KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configurationWithADirInClasspath, EnvironmentConfigFiles.JVM_CONFIG_FILES); KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configurationWithADirInClasspath, EnvironmentConfigFiles.JVM_CONFIG_FILES);
@@ -108,7 +108,7 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends TestCaseWit
String text = FileUtil.loadFile(file, true); String text = FileUtil.loadFile(file, true);
KtFile psiFile = JetTestUtils.createFile(file.getName(), text, jetCoreEnvironment.getProject()); KtFile psiFile = KotlinTestUtils.createFile(file.getName(), text, jetCoreEnvironment.getProject());
ModuleVisibilityManager.SERVICE.getInstance(jetCoreEnvironment.getProject()).addModule(new ModuleBuilder("module for test", tmpdir.getAbsolutePath(), "test")); ModuleVisibilityManager.SERVICE.getInstance(jetCoreEnvironment.getProject()).addModule(new ModuleBuilder("module for test", tmpdir.getAbsolutePath(), "test"));
@@ -42,7 +42,7 @@ import org.jetbrains.kotlin.resolve.jvm.TopDownAnalyzerFacadeForJVM;
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil; import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil;
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor; import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestCaseWithTmpdir; import org.jetbrains.kotlin.test.TestCaseWithTmpdir;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.test.util.DescriptorValidator; import org.jetbrains.kotlin.test.util.DescriptorValidator;
@@ -59,7 +59,7 @@ import java.util.Map;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import static org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil.*; import static org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil.*;
import static org.jetbrains.kotlin.test.JetTestUtils.*; import static org.jetbrains.kotlin.test.KotlinTestUtils.*;
import static org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesAllowed; import static org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesAllowed;
import static org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden; import static org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden;
import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.*; import static org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.*;
@@ -145,7 +145,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
} }
}); });
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK); ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK);
ContentRootsKt.addKotlinSourceRoot(configuration, sourcesDir.getAbsolutePath()); ContentRootsKt.addKotlinSourceRoot(configuration, sourcesDir.getAbsolutePath());
JvmContentRootsKt.addJavaSourceRoot(configuration, new File("compiler/testData/loadJava/include")); JvmContentRootsKt.addJavaSourceRoot(configuration, new File("compiler/testData/loadJava/include"));
@@ -190,7 +190,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, getAnnotationsJar(), libraryOut), compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, getAnnotationsJar(), libraryOut),
EnvironmentConfigFiles.JVM_CONFIG_FILES); EnvironmentConfigFiles.JVM_CONFIG_FILES);
KtFile jetFile = JetTestUtils.createFile(kotlinSrc.getPath(), FileUtil.loadFile(kotlinSrc, true), environment.getProject()); KtFile jetFile = KotlinTestUtils.createFile(kotlinSrc.getPath(), FileUtil.loadFile(kotlinSrc, true), environment.getProject());
AnalysisResult result = JvmResolveUtil.analyzeFilesWithJavaIntegrationAndCheckForErrors( AnalysisResult result = JvmResolveUtil.analyzeFilesWithJavaIntegrationAndCheckForErrors(
environment.getProject(), Collections.singleton(jetFile) environment.getProject(), Collections.singleton(jetFile)
@@ -225,7 +225,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
assertTrue(srcDir.mkdir()); assertTrue(srcDir.mkdir());
assertTrue(compiledDir.mkdir()); assertTrue(compiledDir.mkdir());
List<File> srcFiles = JetTestUtils.createTestFiles( List<File> srcFiles = KotlinTestUtils.createTestFiles(
new File(javaFileName).getName(), FileUtil.loadFile(new File(javaFileName), true), new File(javaFileName).getName(), FileUtil.loadFile(new File(javaFileName), true),
new TestFileFactoryNoModules<File>() { new TestFileFactoryNoModules<File>() {
@NotNull @NotNull
@@ -242,7 +242,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
} }
}); });
JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea( KotlinTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
getTestRootDisposable(), ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK getTestRootDisposable(), ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK
); );
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.cli.common.output.outputUtils.writeAllTo
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.codegen.GenerationUtils import org.jetbrains.kotlin.codegen.GenerationUtils
import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.TestCaseWithTmpdir import org.jetbrains.kotlin.test.TestCaseWithTmpdir
import org.jetbrains.kotlin.utils.join import org.jetbrains.kotlin.utils.join
import org.jetbrains.org.objectweb.asm.* import org.jetbrains.org.objectweb.asm.*
@@ -43,7 +43,7 @@ public abstract class AbstractWriteSignatureTest : TestCaseWithTmpdir() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
jetCoreEnvironment = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable) jetCoreEnvironment = KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable)
} }
override fun tearDown() { override fun tearDown() {
@@ -55,7 +55,7 @@ public abstract class AbstractWriteSignatureTest : TestCaseWithTmpdir() {
val ktFile = File(ktFileName) val ktFile = File(ktFileName)
val text = FileUtil.loadFile(ktFile, true) val text = FileUtil.loadFile(ktFile, true)
val psiFile = JetTestUtils.createFile(ktFile.getName(), text, jetCoreEnvironment!!.project) val psiFile = KotlinTestUtils.createFile(ktFile.getName(), text, jetCoreEnvironment!!.project)
val outputFiles = GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, jetCoreEnvironment!!) val outputFiles = GenerationUtils.compileFileGetClassFileFactoryForTest(psiFile, jetCoreEnvironment!!)
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import java.io.IOException; import java.io.IOException;
@@ -38,15 +38,15 @@ public class AndroidSdkAnnotationsValidityTest extends AbstractSdkAnnotationsVal
@Override @Override
protected KotlinCoreEnvironment createEnvironment(Disposable parentDisposable) { protected KotlinCoreEnvironment createEnvironment(Disposable parentDisposable) {
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.ANDROID_API, JetTestUtils.getAnnotationsJar() ConfigurationKind.JDK_ONLY, TestJdkKind.ANDROID_API, KotlinTestUtils.getAnnotationsJar()
); );
return KotlinCoreEnvironment.createForTests(parentDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); return KotlinCoreEnvironment.createForTests(parentDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
} }
@Override @Override
protected List<FqName> getClassesToValidate() throws IOException { protected List<FqName> getClassesToValidate() throws IOException {
JarFile jar = new JarFile(JetTestUtils.findAndroidApiJar()); JarFile jar = new JarFile(KotlinTestUtils.findAndroidApiJar());
try { try {
Enumeration<JarEntry> entries = jar.entries(); Enumeration<JarEntry> entries = jar.entries();
Set<FqName> result = Sets.newLinkedHashSet(); Set<FqName> result = Sets.newLinkedHashSet();
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler;
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,7 +32,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class BlackBoxMultifileClassKotlinTestGenerated extends AbstractBlackBoxMultifileClassCodegenTest { public class BlackBoxMultifileClassKotlinTestGenerated extends AbstractBlackBoxMultifileClassCodegenTest {
public void testAllFilesPresentInBoxMultifileClasses() throws Exception { public void testAllFilesPresentInBoxMultifileClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses"), Pattern.compile("^(.+)\\.1.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses"), Pattern.compile("^(.+)\\.1.kt$"), true);
} }
@TestMetadata("compiler/testData/codegen/boxMultifileClasses/calls") @TestMetadata("compiler/testData/codegen/boxMultifileClasses/calls")
@@ -40,24 +40,24 @@ public class BlackBoxMultifileClassKotlinTestGenerated extends AbstractBlackBoxM
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Calls extends AbstractBlackBoxMultifileClassCodegenTest { public static class Calls extends AbstractBlackBoxMultifileClassCodegenTest {
public void testAllFilesPresentInCalls() throws Exception { public void testAllFilesPresentInCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses/calls"), Pattern.compile("^(.+)\\.1.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses/calls"), Pattern.compile("^(.+)\\.1.kt$"), true);
} }
@TestMetadata("callFromOtherPackage.1.kt") @TestMetadata("callFromOtherPackage.1.kt")
public void testCallFromOtherPackage() throws Exception { public void testCallFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/callFromOtherPackage.1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/callFromOtherPackage.1.kt");
doTestMultifileClassAgainstSources(fileName); doTestMultifileClassAgainstSources(fileName);
} }
@TestMetadata("valFromOtherPackage.1.kt") @TestMetadata("valFromOtherPackage.1.kt")
public void testValFromOtherPackage() throws Exception { public void testValFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/valFromOtherPackage.1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/valFromOtherPackage.1.kt");
doTestMultifileClassAgainstSources(fileName); doTestMultifileClassAgainstSources(fileName);
} }
@TestMetadata("varFromOtherPackage.1.kt") @TestMetadata("varFromOtherPackage.1.kt")
public void testVarFromOtherPackage() throws Exception { public void testVarFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/varFromOtherPackage.1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/varFromOtherPackage.1.kt");
doTestMultifileClassAgainstSources(fileName); doTestMultifileClassAgainstSources(fileName);
} }
} }
@@ -21,7 +21,7 @@ import junit.framework.TestCase;
import org.jetbrains.kotlin.cli.common.ExitCode; import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler; import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime; import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.junit.Assert; import org.junit.Assert;
import java.io.File; import java.io.File;
@@ -37,7 +37,7 @@ public class CompileEnvironmentTest extends TestCase {
File stdlib = ForTestCompileRuntime.runtimeJarForTests(); File stdlib = ForTestCompileRuntime.runtimeJarForTests();
ExitCode exitCode = new K2JVMCompiler().exec( ExitCode exitCode = new K2JVMCompiler().exec(
System.out, System.out,
JetTestUtils.getTestDataPathBase() + "/compiler/smoke/Smoke.kt", KotlinTestUtils.getTestDataPathBase() + "/compiler/smoke/Smoke.kt",
"-d", out.getAbsolutePath(), "-d", out.getAbsolutePath(),
"-no-stdlib", "-no-stdlib",
"-classpath", stdlib.getAbsolutePath() "-classpath", stdlib.getAbsolutePath()
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler;
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,7 +32,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAgainstKotlinTest { public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInCompileJavaAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileJavaAgainstKotlin() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/class") @TestMetadata("compiler/testData/compileJavaAgainstKotlin/class")
@@ -40,84 +40,84 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Class extends AbstractCompileJavaAgainstKotlinTest { public static class Class extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInClass() throws Exception { public void testAllFilesPresentInClass() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/class"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/class"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ClassObject.kt") @TestMetadata("ClassObject.kt")
public void testClassObject() throws Exception { public void testClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("DefaultConstructor.kt") @TestMetadata("DefaultConstructor.kt")
public void testDefaultConstructor() throws Exception { public void testDefaultConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("DefaultConstructorWithTwoArgs.kt") @TestMetadata("DefaultConstructorWithTwoArgs.kt")
public void testDefaultConstructorWithTwoArgs() throws Exception { public void testDefaultConstructorWithTwoArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructorWithTwoArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructorWithTwoArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ExtendsAbstractListT.kt") @TestMetadata("ExtendsAbstractListT.kt")
public void testExtendsAbstractListT() throws Exception { public void testExtendsAbstractListT() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImplementsListString.kt") @TestMetadata("ImplementsListString.kt")
public void testImplementsListString() throws Exception { public void testImplementsListString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImplementsMapPP.kt") @TestMetadata("ImplementsMapPP.kt")
public void testImplementsMapPP() throws Exception { public void testImplementsMapPP() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InnerClass.kt") @TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception { public void testInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InnerClassConstructors.kt") @TestMetadata("InnerClassConstructors.kt")
public void testInnerClassConstructors() throws Exception { public void testInnerClassConstructors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassConstructors.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassConstructors.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InnerClassOfGeneric.kt") @TestMetadata("InnerClassOfGeneric.kt")
public void testInnerClassOfGeneric() throws Exception { public void testInnerClassOfGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassOfGeneric.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassOfGeneric.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt3561.kt") @TestMetadata("kt3561.kt")
public void testKt3561() throws Exception { public void testKt3561() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt3561.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt3561.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt4050.kt") @TestMetadata("kt4050.kt")
public void testKt4050() throws Exception { public void testKt4050() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt4050.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt4050.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Simple.kt") @TestMetadata("Simple.kt")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/Simple.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/Simple.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StarProjection.kt") @TestMetadata("StarProjection.kt")
public void testStarProjection() throws Exception { public void testStarProjection() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/StarProjection.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/StarProjection.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -127,12 +127,12 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Enum extends AbstractCompileJavaAgainstKotlinTest { public static class Enum extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInEnum() throws Exception { public void testAllFilesPresentInEnum() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("DefaultArgumentInEnumConstructor.kt") @TestMetadata("DefaultArgumentInEnumConstructor.kt")
public void testDefaultArgumentInEnumConstructor() throws Exception { public void testDefaultArgumentInEnumConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/enum/DefaultArgumentInEnumConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/enum/DefaultArgumentInEnumConstructor.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -143,143 +143,143 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
public static class Method extends AbstractCompileJavaAgainstKotlinTest { public static class Method extends AbstractCompileJavaAgainstKotlinTest {
@TestMetadata("AccessorGenericSignature.kt") @TestMetadata("AccessorGenericSignature.kt")
public void testAccessorGenericSignature() throws Exception { public void testAccessorGenericSignature() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/AccessorGenericSignature.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/AccessorGenericSignature.kt");
doTest(fileName); doTest(fileName);
} }
public void testAllFilesPresentInMethod() throws Exception { public void testAllFilesPresentInMethod() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Any.kt") @TestMetadata("Any.kt")
public void testAny() throws Exception { public void testAny() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Any.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Any.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ArrayOfIntArray.kt") @TestMetadata("ArrayOfIntArray.kt")
public void testArrayOfIntArray() throws Exception { public void testArrayOfIntArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntArray.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntArray.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ArrayOfIntegerArray.kt") @TestMetadata("ArrayOfIntegerArray.kt")
public void testArrayOfIntegerArray() throws Exception { public void testArrayOfIntegerArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClashingSignaturesWithoutReturnType.kt") @TestMetadata("ClashingSignaturesWithoutReturnType.kt")
public void testClashingSignaturesWithoutReturnType() throws Exception { public void testClashingSignaturesWithoutReturnType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ClashingSignaturesWithoutReturnType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ClashingSignaturesWithoutReturnType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Delegation.kt") @TestMetadata("Delegation.kt")
public void testDelegation() throws Exception { public void testDelegation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Extensions.kt") @TestMetadata("Extensions.kt")
public void testExtensions() throws Exception { public void testExtensions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("GenericArray.kt") @TestMetadata("GenericArray.kt")
public void testGenericArray() throws Exception { public void testGenericArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Hello.kt") @TestMetadata("Hello.kt")
public void testHello() throws Exception { public void testHello() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Hello.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Hello.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Int.kt") @TestMetadata("Int.kt")
public void testInt() throws Exception { public void testInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Int.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Int.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntArray.kt") @TestMetadata("IntArray.kt")
public void testIntArray() throws Exception { public void testIntArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntArray.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntArray.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntWithDefault.kt") @TestMetadata("IntWithDefault.kt")
public void testIntWithDefault() throws Exception { public void testIntWithDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntWithDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntWithDefault.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntegerArray.kt") @TestMetadata("IntegerArray.kt")
public void testIntegerArray() throws Exception { public void testIntegerArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntegerArray.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntegerArray.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ListOfInt.kt") @TestMetadata("ListOfInt.kt")
public void testListOfInt() throws Exception { public void testListOfInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ListOfString.kt") @TestMetadata("ListOfString.kt")
public void testListOfString() throws Exception { public void testListOfString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ListOfT.kt") @TestMetadata("ListOfT.kt")
public void testListOfT() throws Exception { public void testListOfT() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("MapOfKString.kt") @TestMetadata("MapOfKString.kt")
public void testMapOfKString() throws Exception { public void testMapOfKString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("MapOfStringIntQ.kt") @TestMetadata("MapOfStringIntQ.kt")
public void testMapOfStringIntQ() throws Exception { public void testMapOfStringIntQ() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("QExtendsListString.kt") @TestMetadata("QExtendsListString.kt")
public void testQExtendsListString() throws Exception { public void testQExtendsListString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("QExtendsString.kt") @TestMetadata("QExtendsString.kt")
public void testQExtendsString() throws Exception { public void testQExtendsString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("TraitImpl.kt") @TestMetadata("TraitImpl.kt")
public void testTraitImpl() throws Exception { public void testTraitImpl() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Vararg.kt") @TestMetadata("Vararg.kt")
public void testVararg() throws Exception { public void testVararg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Void.kt") @TestMetadata("Void.kt")
public void testVoid() throws Exception { public void testVoid() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Void.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Void.kt");
doTest(fileName); doTest(fileName);
} }
@@ -288,12 +288,12 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest { public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInPlatformName() throws Exception { public void testAllFilesPresentInPlatformName() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/platformName"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/platformName"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("PlatformName.kt") @TestMetadata("PlatformName.kt")
public void testPlatformName() throws Exception { public void testPlatformName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -303,72 +303,72 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PrimitiveOverride extends AbstractCompileJavaAgainstKotlinTest { public static class PrimitiveOverride extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInPrimitiveOverride() throws Exception { public void testAllFilesPresentInPrimitiveOverride() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ByteOverridesObject.kt") @TestMetadata("ByteOverridesObject.kt")
public void testByteOverridesObject() throws Exception { public void testByteOverridesObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("CallFinalNotInSubclass.kt") @TestMetadata("CallFinalNotInSubclass.kt")
public void testCallFinalNotInSubclass() throws Exception { public void testCallFinalNotInSubclass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("CallNotInSubclass.kt") @TestMetadata("CallNotInSubclass.kt")
public void testCallNotInSubclass() throws Exception { public void testCallNotInSubclass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("CovariantReturnTypeOverride.kt") @TestMetadata("CovariantReturnTypeOverride.kt")
public void testCovariantReturnTypeOverride() throws Exception { public void testCovariantReturnTypeOverride() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FinalOverride.kt") @TestMetadata("FinalOverride.kt")
public void testFinalOverride() throws Exception { public void testFinalOverride() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntOverridesComparable.kt") @TestMetadata("IntOverridesComparable.kt")
public void testIntOverridesComparable() throws Exception { public void testIntOverridesComparable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntOverridesNumber.kt") @TestMetadata("IntOverridesNumber.kt")
public void testIntOverridesNumber() throws Exception { public void testIntOverridesNumber() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntOverridesObject.kt") @TestMetadata("IntOverridesObject.kt")
public void testIntOverridesObject() throws Exception { public void testIntOverridesObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ManyClassesHierarchy.kt") @TestMetadata("ManyClassesHierarchy.kt")
public void testManyClassesHierarchy() throws Exception { public void testManyClassesHierarchy() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NullableIntOverridesObject.kt") @TestMetadata("NullableIntOverridesObject.kt")
public void testNullableIntOverridesObject() throws Exception { public void testNullableIntOverridesObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OverrideInJava.kt") @TestMetadata("OverrideInJava.kt")
public void testOverrideInJava() throws Exception { public void testOverrideInJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -378,48 +378,48 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Throws extends AbstractCompileJavaAgainstKotlinTest { public static class Throws extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInThrows() throws Exception { public void testAllFilesPresentInThrows() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/throws"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/throws"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ClassMembers.kt") @TestMetadata("ClassMembers.kt")
public void testClassMembers() throws Exception { public void testClassMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/ClassMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/ClassMembers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Constructor.kt") @TestMetadata("Constructor.kt")
public void testConstructor() throws Exception { public void testConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("DefaultArgs.kt") @TestMetadata("DefaultArgs.kt")
public void testDefaultArgs() throws Exception { public void testDefaultArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Delegation.kt") @TestMetadata("Delegation.kt")
public void testDelegation() throws Exception { public void testDelegation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("GenericSubstitution.kt") @TestMetadata("GenericSubstitution.kt")
public void testGenericSubstitution() throws Exception { public void testGenericSubstitution() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("TopLevel.kt") @TestMetadata("TopLevel.kt")
public void testTopLevel() throws Exception { public void testTopLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TopLevel.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TopLevel.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("TraitMembers.kt") @TestMetadata("TraitMembers.kt")
public void testTraitMembers() throws Exception { public void testTraitMembers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -430,30 +430,30 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PlatformStatic extends AbstractCompileJavaAgainstKotlinTest { public static class PlatformStatic extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInPlatformStatic() throws Exception { public void testAllFilesPresentInPlatformStatic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/platformStatic"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/platformStatic"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("simpleClassObject.kt") @TestMetadata("simpleClassObject.kt")
public void testSimpleClassObject() throws Exception { public void testSimpleClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleClassObjectProperty.kt") @TestMetadata("simpleClassObjectProperty.kt")
public void testSimpleClassObjectProperty() throws Exception { public void testSimpleClassObjectProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleClassObjectProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleObject.kt") @TestMetadata("simpleObject.kt")
public void testSimpleObject() throws Exception { public void testSimpleObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleObjectProperty.kt") @TestMetadata("simpleObjectProperty.kt")
public void testSimpleObjectProperty() throws Exception { public void testSimpleObjectProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObjectProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/platformStatic/simpleObjectProperty.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -463,24 +463,24 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Property extends AbstractCompileJavaAgainstKotlinTest { public static class Property extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInProperty() throws Exception { public void testAllFilesPresentInProperty() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ConstVal.kt") @TestMetadata("ConstVal.kt")
public void testConstVal() throws Exception { public void testConstVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/ConstVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/ConstVal.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Extensions.kt") @TestMetadata("Extensions.kt")
public void testExtensions() throws Exception { public void testExtensions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("GenericProperty.kt") @TestMetadata("GenericProperty.kt")
public void testGenericProperty() throws Exception { public void testGenericProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt");
doTest(fileName); doTest(fileName);
} }
@@ -489,12 +489,12 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest { public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInPlatformName() throws Exception { public void testAllFilesPresentInPlatformName() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property/platformName"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property/platformName"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("PlatformName.kt") @TestMetadata("PlatformName.kt")
public void testPlatformName() throws Exception { public void testPlatformName() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -505,18 +505,18 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Sealed extends AbstractCompileJavaAgainstKotlinTest { public static class Sealed extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInSealed() throws Exception { public void testAllFilesPresentInSealed() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/sealed"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/sealed"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Derived.kt") @TestMetadata("Derived.kt")
public void testDerived() throws Exception { public void testDerived() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Derived.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Derived.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Instance.kt") @TestMetadata("Instance.kt")
public void testInstance() throws Exception { public void testInstance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Instance.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Instance.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -526,36 +526,36 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class StaticFields extends AbstractCompileJavaAgainstKotlinTest { public static class StaticFields extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInStaticFields() throws Exception { public void testAllFilesPresentInStaticFields() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/staticFields"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/staticFields"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("AnnotationClass.kt") @TestMetadata("AnnotationClass.kt")
public void testAnnotationClass() throws Exception { public void testAnnotationClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("AnnotationTrait.kt") @TestMetadata("AnnotationTrait.kt")
public void testAnnotationTrait() throws Exception { public void testAnnotationTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt3698.kt") @TestMetadata("kt3698.kt")
public void testKt3698() throws Exception { public void testKt3698() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("staticClassProperty.kt") @TestMetadata("staticClassProperty.kt")
public void testStaticClassProperty() throws Exception { public void testStaticClassProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("staticTraitProperty.kt") @TestMetadata("staticTraitProperty.kt")
public void testStaticTraitProperty() throws Exception { public void testStaticTraitProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -565,84 +565,84 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Targets extends AbstractCompileJavaAgainstKotlinTest { public static class Targets extends AbstractCompileJavaAgainstKotlinTest {
public void testAllFilesPresentInTargets() throws Exception { public void testAllFilesPresentInTargets() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/targets"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/targets"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("annotation.kt") @TestMetadata("annotation.kt")
public void testAnnotation() throws Exception { public void testAnnotation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/annotation.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/annotation.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("base.kt") @TestMetadata("base.kt")
public void testBase() throws Exception { public void testBase() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/base.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/base.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classifier.kt") @TestMetadata("classifier.kt")
public void testClassifier() throws Exception { public void testClassifier() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/classifier.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/classifier.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("constructor.kt") @TestMetadata("constructor.kt")
public void testConstructor() throws Exception { public void testConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/constructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/constructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("empty.kt") @TestMetadata("empty.kt")
public void testEmpty() throws Exception { public void testEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/empty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/empty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("field.kt") @TestMetadata("field.kt")
public void testField() throws Exception { public void testField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/field.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/field.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("function.kt") @TestMetadata("function.kt")
public void testFunction() throws Exception { public void testFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/function.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/function.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("getter.kt") @TestMetadata("getter.kt")
public void testGetter() throws Exception { public void testGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/getter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/getter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("local.kt") @TestMetadata("local.kt")
public void testLocal() throws Exception { public void testLocal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/local.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/local.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("multiple.kt") @TestMetadata("multiple.kt")
public void testMultiple() throws Exception { public void testMultiple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/multiple.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/multiple.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parameter.kt") @TestMetadata("parameter.kt")
public void testParameter() throws Exception { public void testParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/parameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/parameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("property.kt") @TestMetadata("property.kt")
public void testProperty() throws Exception { public void testProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/property.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/property.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("setter.kt") @TestMetadata("setter.kt")
public void testSetter() throws Exception { public void testSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/setter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/setter.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -86,7 +86,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
Project project = createEnvironment(Arrays.asList(extraClassPath)).getProject(); Project project = createEnvironment(Arrays.asList(extraClassPath)).getProject();
AnalysisResult result = JvmResolveUtil.analyzeOneFileWithJavaIntegrationAndCheckForErrors( AnalysisResult result = JvmResolveUtil.analyzeOneFileWithJavaIntegrationAndCheckForErrors(
JetTestUtils.loadJetFile(project, getTestDataFileWithExtension("kt")) KotlinTestUtils.loadJetFile(project, getTestDataFileWithExtension("kt"))
); );
PackageViewDescriptor packageView = result.getModuleDescriptor().getPackage(LoadDescriptorUtil.TEST_PACKAGE_FQNAME); PackageViewDescriptor packageView = result.getModuleDescriptor().getPackage(LoadDescriptorUtil.TEST_PACKAGE_FQNAME);
@@ -98,9 +98,9 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
private KotlinCoreEnvironment createEnvironment(@NotNull List<File> extraClassPath) { private KotlinCoreEnvironment createEnvironment(@NotNull List<File> extraClassPath) {
List<File> extras = new ArrayList<File>(); List<File> extras = new ArrayList<File>();
extras.addAll(extraClassPath); extras.addAll(extraClassPath);
extras.add(JetTestUtils.getAnnotationsJar()); extras.add(KotlinTestUtils.getAnnotationsJar());
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, extras.toArray(new File[extras.size()])); ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, extras.toArray(new File[extras.size()]));
return KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); return KotlinCoreEnvironment.createForTests(getTestRootDisposable(), configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
} }
@@ -142,7 +142,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
} }
public void testRawTypes() throws Exception { public void testRawTypes() throws Exception {
JetTestUtils.compileJavaFiles( KotlinTestUtils.compileJavaFiles(
Collections.singletonList( Collections.singletonList(
new File(getTestDataDirectory() + "/library/test/A.java") new File(getTestDataDirectory() + "/library/test/A.java")
), ),
@@ -169,7 +169,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
String outputMain = CliBaseTest.getNormalizedCompilerOutput(pair2.first, pair2.second, getTestDataDirectory().getPath()); String outputMain = CliBaseTest.getNormalizedCompilerOutput(pair2.first, pair2.second, getTestDataDirectory().getPath());
JetTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), outputLib + "\n" + outputMain); KotlinTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), outputLib + "\n" + outputMain);
} }
public void testDuplicateObjectInBinaryAndSources() throws Exception { public void testDuplicateObjectInBinaryAndSources() throws Exception {
@@ -199,7 +199,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
// This test checks that there are no PARAMETER_NAME_CHANGED_ON_OVERRIDE or DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES // This test checks that there are no PARAMETER_NAME_CHANGED_ON_OVERRIDE or DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES
// warnings when subclassing in Kotlin from Java binaries (in case when no parameter names are available for Java classes) // warnings when subclassing in Kotlin from Java binaries (in case when no parameter names are available for Java classes)
JetTestUtils.compileJavaFiles( KotlinTestUtils.compileJavaFiles(
Collections.singletonList(getTestDataFileWithExtension("java")), Collections.singletonList(getTestDataFileWithExtension("java")),
Arrays.asList("-d", tmpdir.getPath()) Arrays.asList("-d", tmpdir.getPath())
); );
@@ -207,7 +207,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
Project project = createEnvironment(Collections.singletonList(tmpdir)).getProject(); Project project = createEnvironment(Collections.singletonList(tmpdir)).getProject();
AnalysisResult result = JvmResolveUtil.analyzeOneFileWithJavaIntegration( AnalysisResult result = JvmResolveUtil.analyzeOneFileWithJavaIntegration(
JetTestUtils.loadJetFile(project, getTestDataFileWithExtension("kt")) KotlinTestUtils.loadJetFile(project, getTestDataFileWithExtension("kt"))
); );
result.throwIfError(); result.throwIfError();
@@ -221,7 +221,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
// This test compiles a Java library of two classes (Super and Sub), then deletes Super.class and attempts to compile a Kotlin // This test compiles a Java library of two classes (Super and Sub), then deletes Super.class and attempts to compile a Kotlin
// source against this broken library. The expected result is an "incomplete hierarchy" error message from the compiler // source against this broken library. The expected result is an "incomplete hierarchy" error message from the compiler
JetTestUtils.compileJavaFiles( KotlinTestUtils.compileJavaFiles(
Arrays.asList( Arrays.asList(
new File(getTestDataDirectory() + "/library/test/Super.java"), new File(getTestDataDirectory() + "/library/test/Super.java"),
new File(getTestDataDirectory() + "/library/test/Sub.java") new File(getTestDataDirectory() + "/library/test/Sub.java")
@@ -241,7 +241,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
)); ));
String output = CliBaseTest.getNormalizedCompilerOutput(pair.first, pair.second, getTestDataDirectory().getPath()); String output = CliBaseTest.getNormalizedCompilerOutput(pair.first, pair.second, getTestDataDirectory().getPath());
JetTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), output); KotlinTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), output);
} }
public void testIncompleteHierarchyInKotlin() throws Exception { public void testIncompleteHierarchyInKotlin() throws Exception {
@@ -258,7 +258,7 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
)); ));
String output = CliBaseTest.getNormalizedCompilerOutput(pair.first, pair.second, getTestDataDirectory().getPath()); String output = CliBaseTest.getNormalizedCompilerOutput(pair.first, pair.second, getTestDataDirectory().getPath());
JetTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), output); KotlinTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), output);
} }
/*test source mapping generation when source info is absent*/ /*test source mapping generation when source info is absent*/
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler;
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,168 +32,168 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotlinAgainstKotlinTest { public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotlinAgainstKotlinTest {
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.A.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.A.kt$"), true);
} }
@TestMetadata("AnnotationInTrait.A.kt") @TestMetadata("AnnotationInTrait.A.kt")
public void testAnnotationInTrait() throws Exception { public void testAnnotationInTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/AnnotationInTrait.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassInObject.A.kt") @TestMetadata("ClassInObject.A.kt")
public void testClassInObject() throws Exception { public void testClassInObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ClassInObject.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ClassInObject.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassObjectInEnum.A.kt") @TestMetadata("ClassObjectInEnum.A.kt")
public void testClassObjectInEnum() throws Exception { public void testClassObjectInEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ClassObjectInEnum.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ClassObjectInEnum.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassObjectMember.A.kt") @TestMetadata("ClassObjectMember.A.kt")
public void testClassObjectMember() throws Exception { public void testClassObjectMember() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ClassObjectMember.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ClassObjectMember.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ConstructorVararg.A.kt") @TestMetadata("ConstructorVararg.A.kt")
public void testConstructorVararg() throws Exception { public void testConstructorVararg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ConstructorVararg.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ConstructorVararg.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("DefaultConstructor.A.kt") @TestMetadata("DefaultConstructor.A.kt")
public void testDefaultConstructor() throws Exception { public void testDefaultConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/DefaultConstructor.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/DefaultConstructor.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("DoublyNestedClass.A.kt") @TestMetadata("DoublyNestedClass.A.kt")
public void testDoublyNestedClass() throws Exception { public void testDoublyNestedClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/DoublyNestedClass.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/DoublyNestedClass.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Enum.A.kt") @TestMetadata("Enum.A.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/Enum.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/Enum.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportObject.A.kt") @TestMetadata("ImportObject.A.kt")
public void testImportObject() throws Exception { public void testImportObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ImportObject.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/ImportObject.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InlinedConstants.A.kt") @TestMetadata("InlinedConstants.A.kt")
public void testInlinedConstants() throws Exception { public void testInlinedConstants() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/InlinedConstants.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InnerClassConstructor.A.kt") @TestMetadata("InnerClassConstructor.A.kt")
public void testInnerClassConstructor() throws Exception { public void testInnerClassConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/InnerClassConstructor.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/InnerClassConstructor.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("jvmField.A.kt") @TestMetadata("jvmField.A.kt")
public void testJvmField() throws Exception { public void testJvmField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmField.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmField.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("JvmNameOnAccessor.A.kt") @TestMetadata("JvmNameOnAccessor.A.kt")
public void testJvmNameOnAccessor() throws Exception { public void testJvmNameOnAccessor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/JvmNameOnAccessor.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/JvmNameOnAccessor.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("KotlinPropertyAsAnnotationParameter.A.kt") @TestMetadata("KotlinPropertyAsAnnotationParameter.A.kt")
public void testKotlinPropertyAsAnnotationParameter() throws Exception { public void testKotlinPropertyAsAnnotationParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("MultifileClassInlineFunctionAccessingProperty.A.kt") @TestMetadata("MultifileClassInlineFunctionAccessingProperty.A.kt")
public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { public void testMultifileClassInlineFunctionAccessingProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/MultifileClassInlineFunctionAccessingProperty.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/MultifileClassInlineFunctionAccessingProperty.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NestedClass.A.kt") @TestMetadata("NestedClass.A.kt")
public void testNestedClass() throws Exception { public void testNestedClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/NestedClass.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/NestedClass.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NestedEnum.A.kt") @TestMetadata("NestedEnum.A.kt")
public void testNestedEnum() throws Exception { public void testNestedEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/NestedEnum.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/NestedEnum.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NestedObject.A.kt") @TestMetadata("NestedObject.A.kt")
public void testNestedObject() throws Exception { public void testNestedObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/NestedObject.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/NestedObject.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PlatformNames.A.kt") @TestMetadata("PlatformNames.A.kt")
public void testPlatformNames() throws Exception { public void testPlatformNames() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformNames.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformNames.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PlatformStaticInObject.A.kt") @TestMetadata("PlatformStaticInObject.A.kt")
public void testPlatformStaticInObject() throws Exception { public void testPlatformStaticInObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformStaticInObject.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformStaticInObject.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PlatformTypes.A.kt") @TestMetadata("PlatformTypes.A.kt")
public void testPlatformTypes() throws Exception { public void testPlatformTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformTypes.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformTypes.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertyReference.A.kt") @TestMetadata("PropertyReference.A.kt")
public void testPropertyReference() throws Exception { public void testPropertyReference() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PropertyReference.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PropertyReference.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("RecursiveGeneric.A.kt") @TestMetadata("RecursiveGeneric.A.kt")
public void testRecursiveGeneric() throws Exception { public void testRecursiveGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/RecursiveGeneric.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/RecursiveGeneric.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SecondaryConstructors.A.kt") @TestMetadata("SecondaryConstructors.A.kt")
public void testSecondaryConstructors() throws Exception { public void testSecondaryConstructors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/SecondaryConstructors.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/SecondaryConstructors.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Simple.A.kt") @TestMetadata("Simple.A.kt")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/Simple.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/Simple.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SimpleValAnonymousObject.A.kt") @TestMetadata("SimpleValAnonymousObject.A.kt")
public void testSimpleValAnonymousObject() throws Exception { public void testSimpleValAnonymousObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/SimpleValAnonymousObject.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/SimpleValAnonymousObject.A.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StarImportEnum.A.kt") @TestMetadata("StarImportEnum.A.kt")
public void testStarImportEnum() throws Exception { public void testStarImportEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/StarImportEnum.A.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/StarImportEnum.A.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler;
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,7 +32,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class CompileKotlinAgainstMultifileKotlinTestGenerated extends AbstractCompileKotlinAgainstMultifileKotlinTest { public class CompileKotlinAgainstMultifileKotlinTestGenerated extends AbstractCompileKotlinAgainstMultifileKotlinTest {
public void testAllFilesPresentInBoxMultifileClasses() throws Exception { public void testAllFilesPresentInBoxMultifileClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses"), Pattern.compile("^(.+)\\.1.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses"), Pattern.compile("^(.+)\\.1.kt$"), true);
} }
@TestMetadata("compiler/testData/codegen/boxMultifileClasses/calls") @TestMetadata("compiler/testData/codegen/boxMultifileClasses/calls")
@@ -40,24 +40,24 @@ public class CompileKotlinAgainstMultifileKotlinTestGenerated extends AbstractCo
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Calls extends AbstractCompileKotlinAgainstMultifileKotlinTest { public static class Calls extends AbstractCompileKotlinAgainstMultifileKotlinTest {
public void testAllFilesPresentInCalls() throws Exception { public void testAllFilesPresentInCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses/calls"), Pattern.compile("^(.+)\\.1.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxMultifileClasses/calls"), Pattern.compile("^(.+)\\.1.kt$"), true);
} }
@TestMetadata("callFromOtherPackage.1.kt") @TestMetadata("callFromOtherPackage.1.kt")
public void testCallFromOtherPackage() throws Exception { public void testCallFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/callFromOtherPackage.1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/callFromOtherPackage.1.kt");
doBoxTest(fileName); doBoxTest(fileName);
} }
@TestMetadata("valFromOtherPackage.1.kt") @TestMetadata("valFromOtherPackage.1.kt")
public void testValFromOtherPackage() throws Exception { public void testValFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/valFromOtherPackage.1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/valFromOtherPackage.1.kt");
doBoxTest(fileName); doBoxTest(fileName);
} }
@TestMetadata("varFromOtherPackage.1.kt") @TestMetadata("varFromOtherPackage.1.kt")
public void testVarFromOtherPackage() throws Exception { public void testVarFromOtherPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/varFromOtherPackage.1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxMultifileClasses/calls/varFromOtherPackage.1.kt");
doBoxTest(fileName); doBoxTest(fileName);
} }
} }
@@ -29,14 +29,12 @@ import com.intellij.openapi.vfs.VirtualFileVisitor;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles; import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.cli.jvm.config.JVMConfigurationKeys;
import org.jetbrains.kotlin.config.CompilerConfiguration; import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
@@ -68,8 +66,8 @@ public class JdkAnnotationsValidityTest extends AbstractSdkAnnotationsValidityTe
private static final Set<String> classesToIgnore = new HashSet<String>(Arrays.asList("javax.management.openmbean.TabularDataSupport")); private static final Set<String> classesToIgnore = new HashSet<String>(Arrays.asList("javax.management.openmbean.TabularDataSupport"));
private static KotlinCoreEnvironment createFullJdkEnvironment(Disposable parentDisposable) { private static KotlinCoreEnvironment createFullJdkEnvironment(Disposable parentDisposable) {
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.FULL_JDK, JetTestUtils.getAnnotationsJar() ConfigurationKind.JDK_ONLY, TestJdkKind.FULL_JDK, KotlinTestUtils.getAnnotationsJar()
); );
// TODO: move this test to idea-tests and re-implement it for ExternalAnnotationsManagerImpl // TODO: move this test to idea-tests and re-implement it for ExternalAnnotationsManagerImpl
// configuration.add(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, new File("ideaSDK/lib/jdkAnnotations.jar")); // configuration.add(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, new File("ideaSDK/lib/jdkAnnotations.jar"));
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.KotlinTestWithEnvironmentManagement import org.jetbrains.kotlin.test.KotlinTestWithEnvironmentManagement
import org.jetbrains.kotlin.test.TestJdkKind import org.jetbrains.kotlin.test.TestJdkKind
import java.io.File import java.io.File
@@ -36,7 +36,7 @@ import kotlin.test.assertTrue
public class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() { public class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() {
fun testAbsentClass() { fun testAbsentClass() {
val tmpdir = JetTestUtils.tmpDirForTest(this) val tmpdir = KotlinTestUtils.tmpDirForTest(this)
val environment = createEnvironment(tmpdir) val environment = createEnvironment(tmpdir)
val project = environment.project val project = environment.project
@@ -47,8 +47,8 @@ public class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() {
} }
fun testNestedClass() { fun testNestedClass() {
val tmpdir = JetTestUtils.tmpDirForTest(this) val tmpdir = KotlinTestUtils.tmpDirForTest(this)
JetTestUtils.compileKotlinWithJava( KotlinTestUtils.compileKotlinWithJava(
listOf(), listOf(File("compiler/testData/kotlinClassFinder/nestedClass.kt")), tmpdir, getTestRootDisposable()!!, null listOf(), listOf(File("compiler/testData/kotlinClassFinder/nestedClass.kt")), tmpdir, getTestRootDisposable()!!, null
) )
@@ -68,7 +68,7 @@ public class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() {
private fun createEnvironment(tmpdir: File?): KotlinCoreEnvironment { private fun createEnvironment(tmpdir: File?): KotlinCoreEnvironment {
val environment = KotlinCoreEnvironment.createForTests(getTestRootDisposable()!!, val environment = KotlinCoreEnvironment.createForTests(getTestRootDisposable()!!,
JetTestUtils.compilerConfigurationForTests( KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, tmpdir), ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, tmpdir),
EnvironmentConfigFiles.JVM_CONFIG_FILES) EnvironmentConfigFiles.JVM_CONFIG_FILES)
@@ -42,14 +42,14 @@ import org.jetbrains.kotlin.resolve.BindingTrace;
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil; import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil;
import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil; import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
import static org.jetbrains.kotlin.test.JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations; import static org.jetbrains.kotlin.test.KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations;
public final class LoadDescriptorUtil { public final class LoadDescriptorUtil {
@@ -67,9 +67,10 @@ public final class LoadDescriptorUtil {
@NotNull ConfigurationKind configurationKind, @NotNull ConfigurationKind configurationKind,
boolean useTypeTableInSerializer boolean useTypeTableInSerializer
) { ) {
JetFilesAndAnalysisResult filesAndResult = JetFilesAndAnalysisResult.createJetFilesAndAnalyze(kotlinFiles, disposable, configurationKind); KtFilesAndAnalysisResult
filesAndResult = KtFilesAndAnalysisResult.createJetFilesAndAnalyze(kotlinFiles, disposable, configurationKind);
AnalysisResult result = filesAndResult.getAnalysisResult(); AnalysisResult result = filesAndResult.getAnalysisResult();
List<KtFile> files = filesAndResult.getJetFiles(); List<KtFile> files = filesAndResult.getKtFiles();
GenerationState state = GenerationUtils.compileFilesGetGenerationState( GenerationState state = GenerationUtils.compileFilesGetGenerationState(
files.get(0).getProject(), result, files, useTypeTableInSerializer files.get(0).getProject(), result, files, useTypeTableInSerializer
); );
@@ -86,7 +87,7 @@ public final class LoadDescriptorUtil {
boolean isBinaryRoot boolean isBinaryRoot
) { ) {
List<File> javaBinaryRoots = new ArrayList<File>(); List<File> javaBinaryRoots = new ArrayList<File>();
javaBinaryRoots.add(JetTestUtils.getAnnotationsJar()); javaBinaryRoots.add(KotlinTestUtils.getAnnotationsJar());
List<File> javaSourceRoots = new ArrayList<File>(); List<File> javaSourceRoots = new ArrayList<File>();
javaSourceRoots.add(new File("compiler/testData/loadJava/include")); javaSourceRoots.add(new File("compiler/testData/loadJava/include"));
@@ -96,7 +97,7 @@ public final class LoadDescriptorUtil {
else { else {
javaSourceRoots.add(javaRoot); javaSourceRoots.add(javaRoot);
} }
CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( CompilerConfiguration configuration = KotlinTestUtils.compilerConfigurationForTests(
configurationKind, configurationKind,
testJdkKind, testJdkKind,
javaBinaryRoots, javaBinaryRoots,
@@ -115,17 +116,17 @@ public final class LoadDescriptorUtil {
public static void compileJavaWithAnnotationsJar(@NotNull Collection<File> javaFiles, @NotNull File outDir) throws IOException { public static void compileJavaWithAnnotationsJar(@NotNull Collection<File> javaFiles, @NotNull File outDir) throws IOException {
String classPath = ForTestCompileRuntime.runtimeJarForTests() + File.pathSeparator + String classPath = ForTestCompileRuntime.runtimeJarForTests() + File.pathSeparator +
JetTestUtils.getAnnotationsJar().getPath(); KotlinTestUtils.getAnnotationsJar().getPath();
JetTestUtils.compileJavaFiles(javaFiles, Arrays.asList( KotlinTestUtils.compileJavaFiles(javaFiles, Arrays.asList(
"-classpath", classPath, "-classpath", classPath,
"-sourcepath", "compiler/testData/loadJava/include", "-sourcepath", "compiler/testData/loadJava/include",
"-d", outDir.getPath() "-d", outDir.getPath()
)); ));
} }
private static class JetFilesAndAnalysisResult { private static class KtFilesAndAnalysisResult {
@NotNull @NotNull
public static JetFilesAndAnalysisResult createJetFilesAndAnalyze( public static KtFilesAndAnalysisResult createJetFilesAndAnalyze(
@NotNull List<File> kotlinFiles, @NotNull List<File> kotlinFiles,
@NotNull Disposable disposable, @NotNull Disposable disposable,
@NotNull ConfigurationKind configurationKind @NotNull ConfigurationKind configurationKind
@@ -135,7 +136,7 @@ public final class LoadDescriptorUtil {
@Override @Override
public KtFile fun(File kotlinFile) { public KtFile fun(File kotlinFile) {
try { try {
return JetTestUtils.createFile( return KotlinTestUtils.createFile(
kotlinFile.getName(), FileUtil.loadFile(kotlinFile, true), jetCoreEnvironment.getProject()); kotlinFile.getName(), FileUtil.loadFile(kotlinFile, true), jetCoreEnvironment.getProject());
} }
catch (IOException e) { catch (IOException e) {
@@ -145,20 +146,20 @@ public final class LoadDescriptorUtil {
}); });
AnalysisResult result = JvmResolveUtil.analyzeFilesWithJavaIntegrationAndCheckForErrors( AnalysisResult result = JvmResolveUtil.analyzeFilesWithJavaIntegrationAndCheckForErrors(
jetCoreEnvironment.getProject(), jetFiles, new JvmPackagePartProvider(jetCoreEnvironment)); jetCoreEnvironment.getProject(), jetFiles, new JvmPackagePartProvider(jetCoreEnvironment));
return new JetFilesAndAnalysisResult(jetFiles, result); return new KtFilesAndAnalysisResult(jetFiles, result);
} }
private final List<KtFile> jetFiles; private final List<KtFile> ktFiles;
private final AnalysisResult result; private final AnalysisResult result;
private JetFilesAndAnalysisResult(@NotNull List<KtFile> jetFiles, @NotNull AnalysisResult result) { private KtFilesAndAnalysisResult(@NotNull List<KtFile> ktFiles, @NotNull AnalysisResult result) {
this.jetFiles = jetFiles; this.ktFiles = ktFiles;
this.result = result; this.result = result;
} }
@NotNull @NotNull
public List<KtFile> getJetFiles() { public List<KtFile> getKtFiles() {
return jetFiles; return ktFiles;
} }
@NotNull @NotNull
File diff suppressed because it is too large Load Diff
@@ -39,7 +39,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.module
import org.jetbrains.kotlin.resolve.jvm.JvmAnalyzerFacade import org.jetbrains.kotlin.resolve.jvm.JvmAnalyzerFacade
import org.jetbrains.kotlin.resolve.jvm.JvmPlatformParameters import org.jetbrains.kotlin.resolve.jvm.JvmPlatformParameters
import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider import org.jetbrains.kotlin.cli.jvm.compiler.JvmPackagePartProvider
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.types.ErrorUtils import org.jetbrains.kotlin.types.ErrorUtils
import org.junit.Assert import org.junit.Assert
import java.io.File import java.io.File
@@ -85,7 +85,7 @@ public class MultiModuleJavaAnalysisCustomTest : UsefulTestCase() {
val modules = HashMap<String, TestModule>() val modules = HashMap<String, TestModule>()
for (dir in moduleDirs) { for (dir in moduleDirs) {
val name = dir.getName() val name = dir.getName()
val kotlinFiles = JetTestUtils.loadToJetFiles(environment, dir.listFiles { it.extension == "kt" }?.toList().orEmpty()) val kotlinFiles = KotlinTestUtils.loadToJetFiles(environment, dir.listFiles { it.extension == "kt" }?.toList().orEmpty())
val javaFilesScope = object : DelegatingGlobalSearchScope(GlobalSearchScope.allScope(project)) { val javaFilesScope = object : DelegatingGlobalSearchScope(GlobalSearchScope.allScope(project)) {
override fun contains(file: VirtualFile): Boolean { override fun contains(file: VirtualFile): Boolean {
if (file !in myBaseScope!!) return false if (file !in myBaseScope!!) return false
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.jvm.compiler;
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,108 +32,108 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
public void testAllFilesPresentInWriteSignature() throws Exception { public void testAllFilesPresentInWriteSignature() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("ArrayOfCharSequence.kt") @TestMetadata("ArrayOfCharSequence.kt")
public void testArrayOfCharSequence() throws Exception { public void testArrayOfCharSequence() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/ArrayOfCharSequence.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ArrayOfCharSequence.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ArrayOfInt.kt") @TestMetadata("ArrayOfInt.kt")
public void testArrayOfInt() throws Exception { public void testArrayOfInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/ArrayOfInt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ArrayOfInt.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Comparable.kt") @TestMetadata("Comparable.kt")
public void testComparable() throws Exception { public void testComparable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/Comparable.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/Comparable.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Int.kt") @TestMetadata("Int.kt")
public void testInt() throws Exception { public void testInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/Int.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/Int.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntArray.kt") @TestMetadata("IntArray.kt")
public void testIntArray() throws Exception { public void testIntArray() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/IntArray.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/IntArray.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("IntQ.kt") @TestMetadata("IntQ.kt")
public void testIntQ() throws Exception { public void testIntQ() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/IntQ.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/IntQ.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("jlString.kt") @TestMetadata("jlString.kt")
public void testJlString() throws Exception { public void testJlString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/jlString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/jlString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ListOfCharSequence.kt") @TestMetadata("ListOfCharSequence.kt")
public void testListOfCharSequence() throws Exception { public void testListOfCharSequence() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/ListOfCharSequence.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ListOfCharSequence.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ListOfStar.kt") @TestMetadata("ListOfStar.kt")
public void testListOfStar() throws Exception { public void testListOfStar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/ListOfStar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ListOfStar.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("MapEntry.kt") @TestMetadata("MapEntry.kt")
public void testMapEntry() throws Exception { public void testMapEntry() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/MapEntry.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/MapEntry.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("MutableMapEntry.kt") @TestMetadata("MutableMapEntry.kt")
public void testMutableMapEntry() throws Exception { public void testMutableMapEntry() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/MutableMapEntry.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/MutableMapEntry.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NonGeneric.kt") @TestMetadata("NonGeneric.kt")
public void testNonGeneric() throws Exception { public void testNonGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/NonGeneric.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/NonGeneric.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StarProjectionInClass.kt") @TestMetadata("StarProjectionInClass.kt")
public void testStarProjectionInClass() throws Exception { public void testStarProjectionInClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionInClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionInClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StarProjectionInSuper.kt") @TestMetadata("StarProjectionInSuper.kt")
public void testStarProjectionInSuper() throws Exception { public void testStarProjectionInSuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionInSuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionInSuper.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StarProjectionOutsideClass.kt") @TestMetadata("StarProjectionOutsideClass.kt")
public void testStarProjectionOutsideClass() throws Exception { public void testStarProjectionOutsideClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionOutsideClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionOutsideClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VarargCharSequence.kt") @TestMetadata("VarargCharSequence.kt")
public void testVarargCharSequence() throws Exception { public void testVarargCharSequence() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/VarargCharSequence.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/VarargCharSequence.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("VarargGeneric.kt") @TestMetadata("VarargGeneric.kt")
public void testVarargGeneric() throws Exception { public void testVarargGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/VarargGeneric.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/VarargGeneric.kt");
doTest(fileName); doTest(fileName);
} }
@@ -142,30 +142,30 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Annotations extends AbstractWriteSignatureTest { public static class Annotations extends AbstractWriteSignatureTest {
public void testAllFilesPresentInAnnotations() throws Exception { public void testAllFilesPresentInAnnotations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/annotations"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("kArrayClassOfJClass.kt") @TestMetadata("kArrayClassOfJClass.kt")
public void testKArrayClassOfJClass() throws Exception { public void testKArrayClassOfJClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kArrayClassOfJClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kArrayClassOfJClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kArrayClassOfKClass.kt") @TestMetadata("kArrayClassOfKClass.kt")
public void testKArrayClassOfKClass() throws Exception { public void testKArrayClassOfKClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kArrayClassOfKClass.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kArrayClassOfKClass.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kClassBasic.kt") @TestMetadata("kClassBasic.kt")
public void testKClassBasic() throws Exception { public void testKClassBasic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kClassBasic.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kClassBasic.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kClassInt.kt") @TestMetadata("kClassInt.kt")
public void testKClassInt() throws Exception { public void testKClassInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kClassInt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kClassInt.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -175,30 +175,30 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Constructor extends AbstractWriteSignatureTest { public static class Constructor extends AbstractWriteSignatureTest {
public void testAllFilesPresentInConstructor() throws Exception { public void testAllFilesPresentInConstructor() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/constructor"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/constructor"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Constructor0.kt") @TestMetadata("Constructor0.kt")
public void testConstructor0() throws Exception { public void testConstructor0() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/Constructor0.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/Constructor0.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ConstructorCollectionParameter.kt") @TestMetadata("ConstructorCollectionParameter.kt")
public void testConstructorCollectionParameter() throws Exception { public void testConstructorCollectionParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorCollectionParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorCollectionParameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ConstructorWithTypeParameter.kt") @TestMetadata("ConstructorWithTypeParameter.kt")
public void testConstructorWithTypeParameter() throws Exception { public void testConstructorWithTypeParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ConstructorWithTypeParameterAndValueParameterP.kt") @TestMetadata("ConstructorWithTypeParameterAndValueParameterP.kt")
public void testConstructorWithTypeParameterAndValueParameterP() throws Exception { public void testConstructorWithTypeParameterAndValueParameterP() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameterAndValueParameterP.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameterAndValueParameterP.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -208,144 +208,144 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DeclarationSiteVariance extends AbstractWriteSignatureTest { public static class DeclarationSiteVariance extends AbstractWriteSignatureTest {
public void testAllFilesPresentInDeclarationSiteVariance() throws Exception { public void testAllFilesPresentInDeclarationSiteVariance() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/declarationSiteVariance"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/declarationSiteVariance"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("FunctionTwoTypeParameters.kt") @TestMetadata("FunctionTwoTypeParameters.kt")
public void testFunctionTwoTypeParameters() throws Exception { public void testFunctionTwoTypeParameters() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/FunctionTwoTypeParameters.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/FunctionTwoTypeParameters.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InInInPosition.kt") @TestMetadata("InInInPosition.kt")
public void testInInInPosition() throws Exception { public void testInInInPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InInInPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InInInPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InInOutPosition.kt") @TestMetadata("InInOutPosition.kt")
public void testInInOutPosition() throws Exception { public void testInInOutPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InInOutPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InInOutPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InOfInInInPosition.kt") @TestMetadata("InOfInInInPosition.kt")
public void testInOfInInInPosition() throws Exception { public void testInOfInInInPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfInInInPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfInInInPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InOfInInOutPosition.kt") @TestMetadata("InOfInInOutPosition.kt")
public void testInOfInInOutPosition() throws Exception { public void testInOfInInOutPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfInInOutPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfInInOutPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InOfOutInInPosition.kt") @TestMetadata("InOfOutInInPosition.kt")
public void testInOfOutInInPosition() throws Exception { public void testInOfOutInInPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInInPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInInPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InOfOutInOutPosition.kt") @TestMetadata("InOfOutInOutPosition.kt")
public void testInOfOutInOutPosition() throws Exception { public void testInOfOutInOutPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInOutPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInOutPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("MappedSupertypeWithVariance.kt") @TestMetadata("MappedSupertypeWithVariance.kt")
public void testMappedSupertypeWithVariance() throws Exception { public void testMappedSupertypeWithVariance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutInField.kt") @TestMetadata("OutInField.kt")
public void testOutInField() throws Exception { public void testOutInField() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInField.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInField.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutInInPosition.kt") @TestMetadata("OutInInPosition.kt")
public void testOutInInPosition() throws Exception { public void testOutInInPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInInPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInInPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutInOutPosition.kt") @TestMetadata("OutInOutPosition.kt")
public void testOutInOutPosition() throws Exception { public void testOutInOutPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInOutPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInOutPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutOfInInInPosition.kt") @TestMetadata("OutOfInInInPosition.kt")
public void testOutOfInInInPosition() throws Exception { public void testOutOfInInInPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInInPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInInPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutOfInInOutPosition.kt") @TestMetadata("OutOfInInOutPosition.kt")
public void testOutOfInInOutPosition() throws Exception { public void testOutOfInInOutPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInOutPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInOutPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutOfOutInInPosition.kt") @TestMetadata("OutOfOutInInPosition.kt")
public void testOutOfOutInInPosition() throws Exception { public void testOutOfOutInInPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInInPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInInPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("OutOfOutInOutPosition.kt") @TestMetadata("OutOfOutInOutPosition.kt")
public void testOutOfOutInOutPosition() throws Exception { public void testOutOfOutInOutPosition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInOutPosition.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInOutPosition.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertyGetterIn.kt") @TestMetadata("PropertyGetterIn.kt")
public void testPropertyGetterIn() throws Exception { public void testPropertyGetterIn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterIn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterIn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertyGetterOut.kt") @TestMetadata("PropertyGetterOut.kt")
public void testPropertyGetterOut() throws Exception { public void testPropertyGetterOut() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterOut.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterOut.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertyGetterTwoParams.kt") @TestMetadata("PropertyGetterTwoParams.kt")
public void testPropertyGetterTwoParams() throws Exception { public void testPropertyGetterTwoParams() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterTwoParams.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterTwoParams.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertySetterIn.kt") @TestMetadata("PropertySetterIn.kt")
public void testPropertySetterIn() throws Exception { public void testPropertySetterIn() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterIn.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterIn.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertySetterOut.kt") @TestMetadata("PropertySetterOut.kt")
public void testPropertySetterOut() throws Exception { public void testPropertySetterOut() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterOut.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterOut.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SuperClassWithVariance.kt") @TestMetadata("SuperClassWithVariance.kt")
public void testSuperClassWithVariance() throws Exception { public void testSuperClassWithVariance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperClassWithVariance.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperClassWithVariance.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SuperTraitWithVariance.kt") @TestMetadata("SuperTraitWithVariance.kt")
public void testSuperTraitWithVariance() throws Exception { public void testSuperTraitWithVariance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("SuperTypeWithVarianceInArguments.kt") @TestMetadata("SuperTypeWithVarianceInArguments.kt")
public void testSuperTypeWithVarianceInArguments() throws Exception { public void testSuperTypeWithVarianceInArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -355,18 +355,18 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Nothing extends AbstractWriteSignatureTest { public static class Nothing extends AbstractWriteSignatureTest {
public void testAllFilesPresentInNothing() throws Exception { public void testAllFilesPresentInNothing() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/nothing"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/nothing"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("nothing.kt") @TestMetadata("nothing.kt")
public void testNothing() throws Exception { public void testNothing() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/nothing/nothing.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/nothing/nothing.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("nullableNothing.kt") @TestMetadata("nullableNothing.kt")
public void testNullableNothing() throws Exception { public void testNullableNothing() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/writeSignature/nothing/nullableNothing.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/nothing/nullableNothing.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt; import org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt;
import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil; import org.jetbrains.kotlin.resolve.lazy.LazyResolveTestUtil;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind; import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.PathUtil; import org.jetbrains.kotlin.utils.PathUtil;
@@ -164,14 +164,14 @@ public class ResolveDescriptorsFromExternalLibraries {
if (jar != null) { if (jar != null) {
jetCoreEnvironment = KotlinCoreEnvironment.createForTests( jetCoreEnvironment = KotlinCoreEnvironment.createForTests(
junk, junk,
JetTestUtils.compilerConfigurationForTests( KotlinTestUtils.compilerConfigurationForTests(
ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, JetTestUtils.getAnnotationsJar(), jar ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, KotlinTestUtils.getAnnotationsJar(), jar
), ),
EnvironmentConfigFiles.JVM_CONFIG_FILES); EnvironmentConfigFiles.JVM_CONFIG_FILES);
} }
else { else {
CompilerConfiguration configuration = CompilerConfiguration configuration =
JetTestUtils.compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.FULL_JDK); KotlinTestUtils.compilerConfigurationForTests(ConfigurationKind.JDK_ONLY, TestJdkKind.FULL_JDK);
jetCoreEnvironment = KotlinCoreEnvironment.createForTests(junk, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES); jetCoreEnvironment = KotlinCoreEnvironment.createForTests(junk, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
if (!findRtJar().equals(jar)) { if (!findRtJar().equals(jar)) {
throw new RuntimeException("rt.jar mismatch: " + jar + ", " + findRtJar()); throw new RuntimeException("rt.jar mismatch: " + jar + ", " + findRtJar());
@@ -263,7 +263,7 @@ public class ResolveDescriptorsFromExternalLibraries {
return file; return file;
} }
JetTestUtils.mkdirs(file.getParentFile()); KotlinTestUtils.mkdirs(file.getParentFile());
File tmp = new File(file.getPath() + "~"); File tmp = new File(file.getPath() + "~");
@@ -39,7 +39,7 @@ import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil
import org.jetbrains.kotlin.resolve.scopes.* import org.jetbrains.kotlin.resolve.scopes.*
import org.jetbrains.kotlin.serialization.deserialization.findClassAcrossModuleDependencies import org.jetbrains.kotlin.serialization.deserialization.findClassAcrossModuleDependencies
import org.jetbrains.kotlin.test.* import org.jetbrains.kotlin.test.*
import org.jetbrains.kotlin.test.JetTestUtils.TestFileFactoryNoModules import org.jetbrains.kotlin.test.KotlinTestUtils.TestFileFactoryNoModules
import org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden import org.jetbrains.kotlin.test.util.DescriptorValidator.ValidationVisitor.errorTypesForbidden
import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator
import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.Configuration import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparator.Configuration
@@ -110,7 +110,7 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
val fileName = file.getName() val fileName = file.getName()
when { when {
fileName.endsWith(".java") -> { fileName.endsWith(".java") -> {
val sources = JetTestUtils.createTestFiles(fileName, text, object : TestFileFactoryNoModules<File>() { val sources = KotlinTestUtils.createTestFiles(fileName, text, object : TestFileFactoryNoModules<File>() {
override fun create(fileName: String, text: String, directives: Map<String, String>): File { override fun create(fileName: String, text: String, directives: Map<String, String>): File {
val targetFile = File(tmpdir, fileName) val targetFile = File(tmpdir, fileName)
targetFile.writeText(adaptJavaSource(text)) targetFile.writeText(adaptJavaSource(text))
@@ -120,10 +120,10 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
LoadDescriptorUtil.compileJavaWithAnnotationsJar(sources, tmpdir) LoadDescriptorUtil.compileJavaWithAnnotationsJar(sources, tmpdir)
} }
fileName.endsWith(".kt") -> { fileName.endsWith(".kt") -> {
val environment = JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea( val environment = KotlinTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
myTestRootDisposable, ConfigurationKind.ALL, jdkKind myTestRootDisposable, ConfigurationKind.ALL, jdkKind
) )
val jetFile = JetTestUtils.createFile(file.getPath(), text, environment.project) val jetFile = KotlinTestUtils.createFile(file.getPath(), text, environment.project)
GenerationUtils.compileFileGetClassFileFactoryForTest(jetFile, environment).writeAllTo(tmpdir) GenerationUtils.compileFileGetClassFileFactoryForTest(jetFile, environment).writeAllTo(tmpdir)
} }
} }
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.cli.common.messages.MessageRenderer;
import org.jetbrains.kotlin.modules.Module; import org.jetbrains.kotlin.modules.Module;
import org.jetbrains.kotlin.cli.common.modules.ModuleScriptData; import org.jetbrains.kotlin.cli.common.modules.ModuleScriptData;
import org.jetbrains.kotlin.cli.common.modules.ModuleXmlParser; import org.jetbrains.kotlin.cli.common.modules.ModuleXmlParser;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@@ -57,7 +57,7 @@ public abstract class AbstractModuleXmlParserTest extends TestCase {
fail("Expected data file does not exist. A new file created: " + txtFile); fail("Expected data file does not exist. A new file created: " + txtFile);
} }
JetTestUtils.assertEqualsToFile(txtFile, actual); KotlinTestUtils.assertEqualsToFile(txtFile, actual);
} }
private static String moduleToString(@NotNull Module module) { private static String moduleToString(@NotNull Module module) {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.modules.xml;
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,54 +32,54 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ModuleXmlParserTestGenerated extends AbstractModuleXmlParserTest { public class ModuleXmlParserTestGenerated extends AbstractModuleXmlParserTest {
public void testAllFilesPresentInModules_xml() throws Exception { public void testAllFilesPresentInModules_xml() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/modules.xml"), Pattern.compile("^(.+)\\.xml$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/modules.xml"), Pattern.compile("^(.+)\\.xml$"), true);
} }
@TestMetadata("allOnce.xml") @TestMetadata("allOnce.xml")
public void testAllOnce() throws Exception { public void testAllOnce() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/allOnce.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/allOnce.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("comments.xml") @TestMetadata("comments.xml")
public void testComments() throws Exception { public void testComments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/comments.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/comments.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("empty.xml") @TestMetadata("empty.xml")
public void testEmpty() throws Exception { public void testEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/empty.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/empty.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("emptyModule.xml") @TestMetadata("emptyModule.xml")
public void testEmptyModule() throws Exception { public void testEmptyModule() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/emptyModule.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/emptyModule.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("manyTimes.xml") @TestMetadata("manyTimes.xml")
public void testManyTimes() throws Exception { public void testManyTimes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/manyTimes.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/manyTimes.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("onlySources.xml") @TestMetadata("onlySources.xml")
public void testOnlySources() throws Exception { public void testOnlySources() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/onlySources.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/onlySources.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("twoModules.xml") @TestMetadata("twoModules.xml")
public void testTwoModules() throws Exception { public void testTwoModules() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/twoModules.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/twoModules.xml");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("typeTestModule.xml") @TestMetadata("typeTestModule.xml")
public void testTypeTestModule() throws Exception { public void testTypeTestModule() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/modules.xml/typeTestModule.xml"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/typeTestModule.xml");
doTest(fileName); doTest(fileName);
} }
} }
File diff suppressed because it is too large Load Diff
@@ -38,7 +38,7 @@ import org.jetbrains.kotlin.resolve.lazy.KotlinTestWithEnvironment
import org.jetbrains.kotlin.resolve.lazy.ResolveSession import org.jetbrains.kotlin.resolve.lazy.ResolveSession
import org.jetbrains.kotlin.resolve.lazy.declarations.FileBasedDeclarationProviderFactory import org.jetbrains.kotlin.resolve.lazy.declarations.FileBasedDeclarationProviderFactory
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.File import java.io.File
import java.util.ArrayList import java.util.ArrayList
@@ -147,7 +147,7 @@ public abstract class AbstractDescriptorRendererTest : KotlinTestWithEnvironment
val renderedDescriptors = descriptors.map { renderer.render(it) }.joinToString(separator = "\n") val renderedDescriptors = descriptors.map { renderer.render(it) }.joinToString(separator = "\n")
val document = DocumentImpl(psiFile.getText()) val document = DocumentImpl(psiFile.getText())
UsefulTestCase.assertSameLines(JetTestUtils.getLastCommentedLines(document), renderedDescriptors.toString()) UsefulTestCase.assertSameLines(KotlinTestUtils.getLastCommentedLines(document), renderedDescriptors.toString())
} }
override fun createEnvironment(): KotlinCoreEnvironment { override fun createEnvironment(): KotlinCoreEnvironment {
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil
import org.jetbrains.kotlin.resolve.lazy.KotlinTestWithEnvironment import org.jetbrains.kotlin.resolve.lazy.KotlinTestWithEnvironment
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.utils.addIfNotNull import org.jetbrains.kotlin.utils.addIfNotNull
import java.io.File import java.io.File
@@ -61,7 +61,7 @@ abstract public class AbstractFunctionDescriptorInExpressionRendererTest : Kotli
val renderedDescriptors = descriptors.map { renderer.render(it) }.joinToString(separator = "\n") val renderedDescriptors = descriptors.map { renderer.render(it) }.joinToString(separator = "\n")
val document = DocumentImpl(file.getText()) val document = DocumentImpl(file.getText())
UsefulTestCase.assertSameLines(JetTestUtils.getLastCommentedLines(document), renderedDescriptors.toString()) UsefulTestCase.assertSameLines(KotlinTestUtils.getLastCommentedLines(document), renderedDescriptors.toString())
} }
override fun createEnvironment(): KotlinCoreEnvironment { override fun createEnvironment(): KotlinCoreEnvironment {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.renderer;
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,84 +32,84 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class DescriptorRendererTestGenerated extends AbstractDescriptorRendererTest { public class DescriptorRendererTestGenerated extends AbstractDescriptorRendererTest {
public void testAllFilesPresentInRenderer() throws Exception { public void testAllFilesPresentInRenderer() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/renderer"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/renderer"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("Classes.kt") @TestMetadata("Classes.kt")
public void testClasses() throws Exception { public void testClasses() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/Classes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/Classes.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Enum.kt") @TestMetadata("Enum.kt")
public void testEnum() throws Exception { public void testEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/Enum.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/Enum.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ErrorType.kt") @TestMetadata("ErrorType.kt")
public void testErrorType() throws Exception { public void testErrorType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/ErrorType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/ErrorType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FunctionTypes.kt") @TestMetadata("FunctionTypes.kt")
public void testFunctionTypes() throws Exception { public void testFunctionTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/FunctionTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/FunctionTypes.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FunctionTypesInSignature.kt") @TestMetadata("FunctionTypesInSignature.kt")
public void testFunctionTypesInSignature() throws Exception { public void testFunctionTypesInSignature() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/FunctionTypesInSignature.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/FunctionTypesInSignature.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("GlobalFunctions.kt") @TestMetadata("GlobalFunctions.kt")
public void testGlobalFunctions() throws Exception { public void testGlobalFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/GlobalFunctions.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/GlobalFunctions.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("GlobalProperties.kt") @TestMetadata("GlobalProperties.kt")
public void testGlobalProperties() throws Exception { public void testGlobalProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/GlobalProperties.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/GlobalProperties.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("InheritedMembersVisibility.kt") @TestMetadata("InheritedMembersVisibility.kt")
public void testInheritedMembersVisibility() throws Exception { public void testInheritedMembersVisibility() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/InheritedMembersVisibility.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/InheritedMembersVisibility.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("KeywordsInNames.kt") @TestMetadata("KeywordsInNames.kt")
public void testKeywordsInNames() throws Exception { public void testKeywordsInNames() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/KeywordsInNames.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/KeywordsInNames.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ObjectWithConstructor.kt") @TestMetadata("ObjectWithConstructor.kt")
public void testObjectWithConstructor() throws Exception { public void testObjectWithConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/ObjectWithConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/ObjectWithConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StarProjection.kt") @TestMetadata("StarProjection.kt")
public void testStarProjection() throws Exception { public void testStarProjection() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/StarProjection.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/StarProjection.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("TraitWithConstructor.kt") @TestMetadata("TraitWithConstructor.kt")
public void testTraitWithConstructor() throws Exception { public void testTraitWithConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/TraitWithConstructor.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/TraitWithConstructor.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("UnitType.kt") @TestMetadata("UnitType.kt")
public void testUnitType() throws Exception { public void testUnitType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderer/UnitType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/UnitType.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.renderer;
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,42 +32,42 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class FunctionDescriptorInExpressionRendererTestGenerated extends AbstractFunctionDescriptorInExpressionRendererTest { public class FunctionDescriptorInExpressionRendererTestGenerated extends AbstractFunctionDescriptorInExpressionRendererTest {
public void testAllFilesPresentInRenderFunctionDescriptorInExpression() throws Exception { public void testAllFilesPresentInRenderFunctionDescriptorInExpression() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/renderFunctionDescriptorInExpression"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/renderFunctionDescriptorInExpression"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("basicFunExpr.kt") @TestMetadata("basicFunExpr.kt")
public void testBasicFunExpr() throws Exception { public void testBasicFunExpr() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("basicFunExprArgs.kt") @TestMetadata("basicFunExprArgs.kt")
public void testBasicFunExprArgs() throws Exception { public void testBasicFunExprArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("basicLambda.kt") @TestMetadata("basicLambda.kt")
public void testBasicLambda() throws Exception { public void testBasicLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("labeledLambda.kt") @TestMetadata("labeledLambda.kt")
public void testLabeledLambda() throws Exception { public void testLabeledLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parenthesizedFunExpr.kt") @TestMetadata("parenthesizedFunExpr.kt")
public void testParenthesizedFunExpr() throws Exception { public void testParenthesizedFunExpr() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("parenthesizedLambda.kt") @TestMetadata("parenthesizedLambda.kt")
public void testParenthesizedLambda() throws Exception { public void testParenthesizedLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -20,7 +20,7 @@ import com.intellij.openapi.util.text.StringUtil
import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.UsefulTestCase
import org.jetbrains.kotlin.cli.jvm.repl.ReplInterpreter import org.jetbrains.kotlin.cli.jvm.repl.ReplInterpreter
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.TestJdkKind import org.jetbrains.kotlin.test.TestJdkKind
import org.junit.Assert import org.junit.Assert
import java.io.File import java.io.File
@@ -81,7 +81,7 @@ public abstract class AbstractReplInterpreterTest : UsefulTestCase() {
} }
protected fun doTest(path: String) { protected fun doTest(path: String) {
val configuration = JetTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK) val configuration = KotlinTestUtils.compilerConfigurationForTests(ConfigurationKind.ALL, TestJdkKind.MOCK_JDK)
val repl = ReplInterpreter(getTestRootDisposable()!!, configuration, false, null) val repl = ReplInterpreter(getTestRootDisposable()!!, configuration, false, null)
for ((code, expected) in loadLines(File(path))) { for ((code, expected) in loadLines(File(path))) {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.repl;
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,84 +32,84 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
public void testAllFilesPresentInRepl() throws Exception { public void testAllFilesPresentInRepl() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("analyzeErrors.repl") @TestMetadata("analyzeErrors.repl")
public void testAnalyzeErrors() throws Exception { public void testAnalyzeErrors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/analyzeErrors.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/analyzeErrors.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("constants.repl") @TestMetadata("constants.repl")
public void testConstants() throws Exception { public void testConstants() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/constants.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/constants.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("empty.repl") @TestMetadata("empty.repl")
public void testEmpty() throws Exception { public void testEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/empty.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/empty.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("evaluationErrors.repl") @TestMetadata("evaluationErrors.repl")
public void testEvaluationErrors() throws Exception { public void testEvaluationErrors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/evaluationErrors.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/evaluationErrors.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("function.repl") @TestMetadata("function.repl")
public void testFunction() throws Exception { public void testFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/function.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/function.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionOverloadResolution.repl") @TestMetadata("functionOverloadResolution.repl")
public void testFunctionOverloadResolution() throws Exception { public void testFunctionOverloadResolution() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/functionOverloadResolution.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/functionOverloadResolution.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionOverloadResolutionAnyBeatsString.repl") @TestMetadata("functionOverloadResolutionAnyBeatsString.repl")
public void testFunctionOverloadResolutionAnyBeatsString() throws Exception { public void testFunctionOverloadResolutionAnyBeatsString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/functionOverloadResolutionAnyBeatsString.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/functionOverloadResolutionAnyBeatsString.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("functionReferencesPrev.repl") @TestMetadata("functionReferencesPrev.repl")
public void testFunctionReferencesPrev() throws Exception { public void testFunctionReferencesPrev() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/functionReferencesPrev.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/functionReferencesPrev.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("imports.repl") @TestMetadata("imports.repl")
public void testImports() throws Exception { public void testImports() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/imports.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/imports.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simple.repl") @TestMetadata("simple.repl")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/simple.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/simple.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleTwoVals.repl") @TestMetadata("simpleTwoVals.repl")
public void testSimpleTwoVals() throws Exception { public void testSimpleTwoVals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/simpleTwoVals.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/simpleTwoVals.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("syntaxErrors.repl") @TestMetadata("syntaxErrors.repl")
public void testSyntaxErrors() throws Exception { public void testSyntaxErrors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/syntaxErrors.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/syntaxErrors.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("twoClosures.repl") @TestMetadata("twoClosures.repl")
public void testTwoClosures() throws Exception { public void testTwoClosures() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/twoClosures.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/twoClosures.repl");
doTest(fileName); doTest(fileName);
} }
@@ -118,60 +118,60 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Classes extends AbstractReplInterpreterTest { public static class Classes extends AbstractReplInterpreterTest {
public void testAllFilesPresentInClasses() throws Exception { public void testAllFilesPresentInClasses() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/classes"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/classes"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("classInheritance.repl") @TestMetadata("classInheritance.repl")
public void testClassInheritance() throws Exception { public void testClassInheritance() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/classInheritance.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/classInheritance.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classRedeclaration.repl") @TestMetadata("classRedeclaration.repl")
public void testClassRedeclaration() throws Exception { public void testClassRedeclaration() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/classRedeclaration.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/classRedeclaration.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("emptyClass.repl") @TestMetadata("emptyClass.repl")
public void testEmptyClass() throws Exception { public void testEmptyClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/emptyClass.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/emptyClass.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("emptyClassRedeclaration.repl") @TestMetadata("emptyClassRedeclaration.repl")
public void testEmptyClassRedeclaration() throws Exception { public void testEmptyClassRedeclaration() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/emptyClassRedeclaration.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/emptyClassRedeclaration.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("enumEntrySubclass.repl") @TestMetadata("enumEntrySubclass.repl")
public void testEnumEntrySubclass() throws Exception { public void testEnumEntrySubclass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/enumEntrySubclass.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/enumEntrySubclass.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("import.repl") @TestMetadata("import.repl")
public void testImport() throws Exception { public void testImport() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/import.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/import.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleClass.repl") @TestMetadata("simpleClass.repl")
public void testSimpleClass() throws Exception { public void testSimpleClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleClass.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleClass.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleEnum.repl") @TestMetadata("simpleEnum.repl")
public void testSimpleEnum() throws Exception { public void testSimpleEnum() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleEnum.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleEnum.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleTrait.repl") @TestMetadata("simpleTrait.repl")
public void testSimpleTrait() throws Exception { public void testSimpleTrait() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleTrait.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleTrait.repl");
doTest(fileName); doTest(fileName);
} }
} }
@@ -181,30 +181,30 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Multiline extends AbstractReplInterpreterTest { public static class Multiline extends AbstractReplInterpreterTest {
public void testAllFilesPresentInMultiline() throws Exception { public void testAllFilesPresentInMultiline() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/multiline"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/multiline"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("functionOnSeveralLines.repl") @TestMetadata("functionOnSeveralLines.repl")
public void testFunctionOnSeveralLines() throws Exception { public void testFunctionOnSeveralLines() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/multiline/functionOnSeveralLines.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/functionOnSeveralLines.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("multilineFunctionInvocation.repl") @TestMetadata("multilineFunctionInvocation.repl")
public void testMultilineFunctionInvocation() throws Exception { public void testMultilineFunctionInvocation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/multiline/multilineFunctionInvocation.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/multilineFunctionInvocation.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("openParenthesisIncomplete.repl") @TestMetadata("openParenthesisIncomplete.repl")
public void testOpenParenthesisIncomplete() throws Exception { public void testOpenParenthesisIncomplete() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/multiline/openParenthesisIncomplete.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/openParenthesisIncomplete.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleFunctionBodyOnNextLine.repl") @TestMetadata("simpleFunctionBodyOnNextLine.repl")
public void testSimpleFunctionBodyOnNextLine() throws Exception { public void testSimpleFunctionBodyOnNextLine() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/multiline/simpleFunctionBodyOnNextLine.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/simpleFunctionBodyOnNextLine.repl");
doTest(fileName); doTest(fileName);
} }
} }
@@ -214,24 +214,24 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Objects extends AbstractReplInterpreterTest { public static class Objects extends AbstractReplInterpreterTest {
public void testAllFilesPresentInObjects() throws Exception { public void testAllFilesPresentInObjects() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/objects"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/objects"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("emptyObject.repl") @TestMetadata("emptyObject.repl")
public void testEmptyObject() throws Exception { public void testEmptyObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/objects/emptyObject.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/objects/emptyObject.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localObject.repl") @TestMetadata("localObject.repl")
public void testLocalObject() throws Exception { public void testLocalObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/objects/localObject.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/objects/localObject.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleObjectDeclaration.repl") @TestMetadata("simpleObjectDeclaration.repl")
public void testSimpleObjectDeclaration() throws Exception { public void testSimpleObjectDeclaration() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/objects/simpleObjectDeclaration.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/objects/simpleObjectDeclaration.repl");
doTest(fileName); doTest(fileName);
} }
} }
@@ -241,18 +241,18 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class PrimitiveTypes extends AbstractReplInterpreterTest { public static class PrimitiveTypes extends AbstractReplInterpreterTest {
public void testAllFilesPresentInPrimitiveTypes() throws Exception { public void testAllFilesPresentInPrimitiveTypes() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/primitiveTypes"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/primitiveTypes"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("arrayOfBoxed.repl") @TestMetadata("arrayOfBoxed.repl")
public void testArrayOfBoxed() throws Exception { public void testArrayOfBoxed() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/primitiveTypes/arrayOfBoxed.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/primitiveTypes/arrayOfBoxed.repl");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("boxingOnPurpose.repl") @TestMetadata("boxingOnPurpose.repl")
public void testBoxingOnPurpose() throws Exception { public void testBoxingOnPurpose() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/primitiveTypes/boxingOnPurpose.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/primitiveTypes/boxingOnPurpose.repl");
doTest(fileName); doTest(fileName);
} }
} }
@@ -262,12 +262,12 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Regressions extends AbstractReplInterpreterTest { public static class Regressions extends AbstractReplInterpreterTest {
public void testAllFilesPresentInRegressions() throws Exception { public void testAllFilesPresentInRegressions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/regressions"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/regressions"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("kt6843.repl") @TestMetadata("kt6843.repl")
public void testKt6843() throws Exception { public void testKt6843() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/regressions/kt6843.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/regressions/kt6843.repl");
doTest(fileName); doTest(fileName);
} }
} }
@@ -277,12 +277,12 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class UseJava extends AbstractReplInterpreterTest { public static class UseJava extends AbstractReplInterpreterTest {
public void testAllFilesPresentInUseJava() throws Exception { public void testAllFilesPresentInUseJava() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/useJava"), Pattern.compile("^(.+)\\.repl$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/useJava"), Pattern.compile("^(.+)\\.repl$"), true);
} }
@TestMetadata("syntheticProperty.repl") @TestMetadata("syntheticProperty.repl")
public void testSyntheticProperty() throws Exception { public void testSyntheticProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/repl/useJava/syntheticProperty.repl"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/useJava/syntheticProperty.repl");
doTest(fileName); doTest(fileName);
} }
} }
@@ -26,8 +26,8 @@ public abstract class AbstractResolveTest extends ExtensibleResolveTestCase {
Project project = getProject(); Project project = getProject();
return new ExpectedResolveData( return new ExpectedResolveData(
JetExpectedResolveDataUtil.prepareDefaultNameToDescriptors(project, getEnvironment()), ExpectedResolveDataUtil.prepareDefaultNameToDescriptors(project, getEnvironment()),
JetExpectedResolveDataUtil.prepareDefaultNameToDeclaration(project, getEnvironment()) ExpectedResolveDataUtil.prepareDefaultNameToDeclaration(project, getEnvironment())
) { ) {
@Override @Override
protected KtFile createJetFile(String fileName, String text) { protected KtFile createJetFile(String fileName, String text) {
@@ -21,14 +21,14 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment; import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.psi.KtFile; import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.ConfigurationKind; import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetLiteFixture; import org.jetbrains.kotlin.test.KotlinLiteFixture;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public abstract class ExtensibleResolveTestCase extends JetLiteFixture { public abstract class ExtensibleResolveTestCase extends KotlinLiteFixture {
private ExpectedResolveData expectedResolveData; private ExpectedResolveData expectedResolveData;
@Override @Override
@@ -52,8 +52,8 @@ public abstract class ExtensibleResolveTestCase extends JetLiteFixture {
protected void doTest(@NonNls String filePath) throws Exception { protected void doTest(@NonNls String filePath) throws Exception {
File file = new File(filePath); File file = new File(filePath);
String text = JetTestUtils.doLoadFile(file); String text = KotlinTestUtils.doLoadFile(file);
List<KtFile> files = JetTestUtils.createTestFiles("file.kt", text, new JetTestUtils.TestFileFactoryNoModules<KtFile>() { List<KtFile> files = KotlinTestUtils.createTestFiles("file.kt", text, new KotlinTestUtils.TestFileFactoryNoModules<KtFile>() {
@NotNull @NotNull
@Override @Override
public KtFile create(@NotNull String fileName, @NotNull String text, @NotNull Map<String, String> directives) { public KtFile create(@NotNull String fileName, @NotNull String text, @NotNull Map<String, String> directives) {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.resolve;
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,174 +32,174 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ResolveTestGenerated extends AbstractResolveTest { public class ResolveTestGenerated extends AbstractResolveTest {
public void testAllFilesPresentInResolve() throws Exception { public void testAllFilesPresentInResolve() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("Basic.resolve") @TestMetadata("Basic.resolve")
public void testBasic() throws Exception { public void testBasic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/Basic.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Basic.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ClassObjects.resolve") @TestMetadata("ClassObjects.resolve")
public void testClassObjects() throws Exception { public void testClassObjects() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ClassObjects.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ClassObjects.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Classifiers.resolve") @TestMetadata("Classifiers.resolve")
public void testClassifiers() throws Exception { public void testClassifiers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/Classifiers.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Classifiers.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("DefaultParamsOfLocalFunctions.resolve") @TestMetadata("DefaultParamsOfLocalFunctions.resolve")
public void testDefaultParamsOfLocalFunctions() throws Exception { public void testDefaultParamsOfLocalFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ErrorSupertype.resolve") @TestMetadata("ErrorSupertype.resolve")
public void testErrorSupertype() throws Exception { public void testErrorSupertype() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ErrorSupertype.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ErrorSupertype.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ExtensionFunctions.resolve") @TestMetadata("ExtensionFunctions.resolve")
public void testExtensionFunctions() throws Exception { public void testExtensionFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ExtensionFunctions.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ExtensionFunctions.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("FunctionVariable.resolve") @TestMetadata("FunctionVariable.resolve")
public void testFunctionVariable() throws Exception { public void testFunctionVariable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/FunctionVariable.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/FunctionVariable.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportFromRootScope.resolve") @TestMetadata("ImportFromRootScope.resolve")
public void testImportFromRootScope() throws Exception { public void testImportFromRootScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ImportFromRootScope.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ImportFromRootScope.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportingRootScopeWhenProcessingImports.resolve") @TestMetadata("ImportingRootScopeWhenProcessingImports.resolve")
public void testImportingRootScopeWhenProcessingImports() throws Exception { public void testImportingRootScopeWhenProcessingImports() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ImportingRootScopeWhenProcessingImports.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ImportingRootScopeWhenProcessingImports.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt304.resolve") @TestMetadata("kt304.resolve")
public void testKt304() throws Exception { public void testKt304() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/kt304.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/kt304.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("LocalObjects.resolve") @TestMetadata("LocalObjects.resolve")
public void testLocalObjects() throws Exception { public void testLocalObjects() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/LocalObjects.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/LocalObjects.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NestedObjects.resolve") @TestMetadata("NestedObjects.resolve")
public void testNestedObjects() throws Exception { public void testNestedObjects() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/NestedObjects.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/NestedObjects.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NoReferenceForErrorAnnotation.resolve") @TestMetadata("NoReferenceForErrorAnnotation.resolve")
public void testNoReferenceForErrorAnnotation() throws Exception { public void testNoReferenceForErrorAnnotation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/NoReferenceForErrorAnnotation.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/NoReferenceForErrorAnnotation.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Objects.resolve") @TestMetadata("Objects.resolve")
public void testObjects() throws Exception { public void testObjects() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/Objects.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Objects.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Packages.resolve") @TestMetadata("Packages.resolve")
public void testPackages() throws Exception { public void testPackages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/Packages.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Packages.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PrimaryConstructorParameters.resolve") @TestMetadata("PrimaryConstructorParameters.resolve")
public void testPrimaryConstructorParameters() throws Exception { public void testPrimaryConstructorParameters() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/PrimaryConstructorParameters.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/PrimaryConstructorParameters.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PrimaryConstructors.resolve") @TestMetadata("PrimaryConstructors.resolve")
public void testPrimaryConstructors() throws Exception { public void testPrimaryConstructors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/PrimaryConstructors.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/PrimaryConstructors.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Projections.resolve") @TestMetadata("Projections.resolve")
public void testProjections() throws Exception { public void testProjections() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/Projections.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Projections.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("PropertyAndFunctionNameClash.resolve") @TestMetadata("PropertyAndFunctionNameClash.resolve")
public void testPropertyAndFunctionNameClash() throws Exception { public void testPropertyAndFunctionNameClash() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/PropertyAndFunctionNameClash.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/PropertyAndFunctionNameClash.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ResolveOfInfixExpressions.resolve") @TestMetadata("ResolveOfInfixExpressions.resolve")
public void testResolveOfInfixExpressions() throws Exception { public void testResolveOfInfixExpressions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ResolveOfInfixExpressions.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveOfInfixExpressions.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ResolveToJava.resolve") @TestMetadata("ResolveToJava.resolve")
public void testResolveToJava() throws Exception { public void testResolveToJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ResolveToJava2.resolve") @TestMetadata("ResolveToJava2.resolve")
public void testResolveToJava2() throws Exception { public void testResolveToJava2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava2.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava2.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ResolveToJava3.resolve") @TestMetadata("ResolveToJava3.resolve")
public void testResolveToJava3() throws Exception { public void testResolveToJava3() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava3.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava3.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ResolveToJavaTypeTransform.resolve") @TestMetadata("ResolveToJavaTypeTransform.resolve")
public void testResolveToJavaTypeTransform() throws Exception { public void testResolveToJavaTypeTransform() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJavaTypeTransform.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJavaTypeTransform.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ScopeInteraction.resolve") @TestMetadata("ScopeInteraction.resolve")
public void testScopeInteraction() throws Exception { public void testScopeInteraction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/ScopeInteraction.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ScopeInteraction.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("StringTemplates.resolve") @TestMetadata("StringTemplates.resolve")
public void testStringTemplates() throws Exception { public void testStringTemplates() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/StringTemplates.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/StringTemplates.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("Super.resolve") @TestMetadata("Super.resolve")
public void testSuper() throws Exception { public void testSuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/Super.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Super.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("TryCatch.resolve") @TestMetadata("TryCatch.resolve")
public void testTryCatch() throws Exception { public void testTryCatch() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/TryCatch.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/TryCatch.resolve");
doTest(fileName); doTest(fileName);
} }
@@ -208,108 +208,108 @@ public class ResolveTestGenerated extends AbstractResolveTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class CandidatesPriority extends AbstractResolveTest { public static class CandidatesPriority extends AbstractResolveTest {
public void testAllFilesPresentInCandidatesPriority() throws Exception { public void testAllFilesPresentInCandidatesPriority() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/candidatesPriority"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/candidatesPriority"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("classObjectOuterResolve.resolve") @TestMetadata("classObjectOuterResolve.resolve")
public void testClassObjectOuterResolve() throws Exception { public void testClassObjectOuterResolve() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("closerReceiver1.resolve") @TestMetadata("closerReceiver1.resolve")
public void testCloserReceiver1() throws Exception { public void testCloserReceiver1() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver1.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver1.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("closerReceiver2.resolve") @TestMetadata("closerReceiver2.resolve")
public void testCloserReceiver2() throws Exception { public void testCloserReceiver2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver2.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver2.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("closerReceiver3.resolve") @TestMetadata("closerReceiver3.resolve")
public void testCloserReceiver3() throws Exception { public void testCloserReceiver3() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver3.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver3.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("closerScope.resolve") @TestMetadata("closerScope.resolve")
public void testCloserScope() throws Exception { public void testCloserScope() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerScope.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerScope.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dispatchReceiverVsExtensionReceiver.resolve") @TestMetadata("dispatchReceiverVsExtensionReceiver.resolve")
public void testDispatchReceiverVsExtensionReceiver() throws Exception { public void testDispatchReceiverVsExtensionReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dispatchReceiverVsExtensionReceiver2.resolve") @TestMetadata("dispatchReceiverVsExtensionReceiver2.resolve")
public void testDispatchReceiverVsExtensionReceiver2() throws Exception { public void testDispatchReceiverVsExtensionReceiver2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver2.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver2.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extensionToCloserReceiverVsMember.resolve") @TestMetadata("extensionToCloserReceiverVsMember.resolve")
public void testExtensionToCloserReceiverVsMember() throws Exception { public void testExtensionToCloserReceiverVsMember() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/extensionToCloserReceiverVsMember.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/extensionToCloserReceiverVsMember.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitThisVsNoReceiver.resolve") @TestMetadata("implicitThisVsNoReceiver.resolve")
public void testImplicitThisVsNoReceiver() throws Exception { public void testImplicitThisVsNoReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitThisVsNoReceiver2.resolve") @TestMetadata("implicitThisVsNoReceiver2.resolve")
public void testImplicitThisVsNoReceiver2() throws Exception { public void testImplicitThisVsNoReceiver2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver2.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver2.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localVsImplicitThis.resolve") @TestMetadata("localVsImplicitThis.resolve")
public void testLocalVsImplicitThis() throws Exception { public void testLocalVsImplicitThis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/localVsImplicitThis.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/localVsImplicitThis.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("memberVsExtension1.resolve") @TestMetadata("memberVsExtension1.resolve")
public void testMemberVsExtension1() throws Exception { public void testMemberVsExtension1() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension1.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension1.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("memberVsExtension2.resolve") @TestMetadata("memberVsExtension2.resolve")
public void testMemberVsExtension2() throws Exception { public void testMemberVsExtension2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension2.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension2.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("memberVsExtension3.resolve") @TestMetadata("memberVsExtension3.resolve")
public void testMemberVsExtension3() throws Exception { public void testMemberVsExtension3() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension3.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension3.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("memberVsLocalExtension.resolve") @TestMetadata("memberVsLocalExtension.resolve")
public void testMemberVsLocalExtension() throws Exception { public void testMemberVsLocalExtension() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsLocalExtension.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsLocalExtension.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("memberWithInvokeVsNonLocal.resolve") @TestMetadata("memberWithInvokeVsNonLocal.resolve")
public void testMemberWithInvokeVsNonLocal() throws Exception { public void testMemberWithInvokeVsNonLocal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberWithInvokeVsNonLocal.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberWithInvokeVsNonLocal.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("wrongReceiverVsOtherError.resolve") @TestMetadata("wrongReceiverVsOtherError.resolve")
public void testWrongReceiverVsOtherError() throws Exception { public void testWrongReceiverVsOtherError() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/wrongReceiverVsOtherError.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/wrongReceiverVsOtherError.resolve");
doTest(fileName); doTest(fileName);
} }
} }
@@ -319,48 +319,48 @@ public class ResolveTestGenerated extends AbstractResolveTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DelegatedProperty extends AbstractResolveTest { public static class DelegatedProperty extends AbstractResolveTest {
public void testAllFilesPresentInDelegatedProperty() throws Exception { public void testAllFilesPresentInDelegatedProperty() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/delegatedProperty"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/delegatedProperty"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("delegationByCall.resolve") @TestMetadata("delegationByCall.resolve")
public void testDelegationByCall() throws Exception { public void testDelegationByCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByCall.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByCall.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationByConstructor.resolve") @TestMetadata("delegationByConstructor.resolve")
public void testDelegationByConstructor() throws Exception { public void testDelegationByConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByConstructor.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByConstructor.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationByFun.resolve") @TestMetadata("delegationByFun.resolve")
public void testDelegationByFun() throws Exception { public void testDelegationByFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByFun.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByFun.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationByObject.resolve") @TestMetadata("delegationByObject.resolve")
public void testDelegationByObject() throws Exception { public void testDelegationByObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByObject.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByObject.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationByProperty.resolve") @TestMetadata("delegationByProperty.resolve")
public void testDelegationByProperty() throws Exception { public void testDelegationByProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByProperty.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByProperty.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegationInClass.resolve") @TestMetadata("delegationInClass.resolve")
public void testDelegationInClass() throws Exception { public void testDelegationInClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationInClass.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationInClass.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("localDelegation.resolve") @TestMetadata("localDelegation.resolve")
public void testLocalDelegation() throws Exception { public void testLocalDelegation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/localDelegation.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/localDelegation.resolve");
doTest(fileName); doTest(fileName);
} }
} }
@@ -370,78 +370,78 @@ public class ResolveTestGenerated extends AbstractResolveTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Imports extends AbstractResolveTest { public static class Imports extends AbstractResolveTest {
public void testAllFilesPresentInImports() throws Exception { public void testAllFilesPresentInImports() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/imports"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/imports"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("ImportConflictAllPackage.resolve") @TestMetadata("ImportConflictAllPackage.resolve")
public void testImportConflictAllPackage() throws Exception { public void testImportConflictAllPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictAllPackage.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictAllPackage.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictBetweenImportedAndRootPackage.resolve") @TestMetadata("ImportConflictBetweenImportedAndRootPackage.resolve")
public void testImportConflictBetweenImportedAndRootPackage() throws Exception { public void testImportConflictBetweenImportedAndRootPackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictBetweenImportedAndSamePackage.resolve") @TestMetadata("ImportConflictBetweenImportedAndSamePackage.resolve")
public void testImportConflictBetweenImportedAndSamePackage() throws Exception { public void testImportConflictBetweenImportedAndSamePackage() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictForFunctions.resolve") @TestMetadata("ImportConflictForFunctions.resolve")
public void testImportConflictForFunctions() throws Exception { public void testImportConflictForFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictForFunctions.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictForFunctions.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictPackageAndClass.resolve") @TestMetadata("ImportConflictPackageAndClass.resolve")
public void testImportConflictPackageAndClass() throws Exception { public void testImportConflictPackageAndClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictPackageAndClass.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictPackageAndClass.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictSameNameClass.resolve") @TestMetadata("ImportConflictSameNameClass.resolve")
public void testImportConflictSameNameClass() throws Exception { public void testImportConflictSameNameClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictSameNameClass.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictSameNameClass.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictWithClassObject.resolve") @TestMetadata("ImportConflictWithClassObject.resolve")
public void testImportConflictWithClassObject() throws Exception { public void testImportConflictWithClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictWithInFileClass.resolve") @TestMetadata("ImportConflictWithInFileClass.resolve")
public void testImportConflictWithInFileClass() throws Exception { public void testImportConflictWithInFileClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithInFileClass.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithInFileClass.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictWithInnerClass.resolve") @TestMetadata("ImportConflictWithInnerClass.resolve")
public void testImportConflictWithInnerClass() throws Exception { public void testImportConflictWithInnerClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithInnerClass.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithInnerClass.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportConflictsWithMappedToJava.resolve") @TestMetadata("ImportConflictsWithMappedToJava.resolve")
public void testImportConflictsWithMappedToJava() throws Exception { public void testImportConflictsWithMappedToJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictsWithMappedToJava.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictsWithMappedToJava.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportNonBlockingAnalysis.resolve") @TestMetadata("ImportNonBlockingAnalysis.resolve")
public void testImportNonBlockingAnalysis() throws Exception { public void testImportNonBlockingAnalysis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("ImportResolveOrderStable.resolve") @TestMetadata("ImportResolveOrderStable.resolve")
public void testImportResolveOrderStable() throws Exception { public void testImportResolveOrderStable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportResolveOrderStable.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportResolveOrderStable.resolve");
doTest(fileName); doTest(fileName);
} }
} }
@@ -451,18 +451,18 @@ public class ResolveTestGenerated extends AbstractResolveTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Labels extends AbstractResolveTest { public static class Labels extends AbstractResolveTest {
public void testAllFilesPresentInLabels() throws Exception { public void testAllFilesPresentInLabels() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/labels"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/labels"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("labelForPropertyInGetter.resolve") @TestMetadata("labelForPropertyInGetter.resolve")
public void testLabelForPropertyInGetter() throws Exception { public void testLabelForPropertyInGetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/labels/labelForPropertyInGetter.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/labels/labelForPropertyInGetter.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("labelForPropertyInSetter.resolve") @TestMetadata("labelForPropertyInSetter.resolve")
public void testLabelForPropertyInSetter() throws Exception { public void testLabelForPropertyInSetter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/labels/labelForPropertyInSetter.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/labels/labelForPropertyInSetter.resolve");
doTest(fileName); doTest(fileName);
} }
} }
@@ -472,18 +472,18 @@ public class ResolveTestGenerated extends AbstractResolveTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Regressions extends AbstractResolveTest { public static class Regressions extends AbstractResolveTest {
public void testAllFilesPresentInRegressions() throws Exception { public void testAllFilesPresentInRegressions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/regressions"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/regressions"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("kt300.resolve") @TestMetadata("kt300.resolve")
public void testKt300() throws Exception { public void testKt300() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/regressions/kt300.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/regressions/kt300.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("objectInsideFun.resolve") @TestMetadata("objectInsideFun.resolve")
public void testObjectInsideFun() throws Exception { public void testObjectInsideFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/regressions/objectInsideFun.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/regressions/objectInsideFun.resolve");
doTest(fileName); doTest(fileName);
} }
} }
@@ -493,24 +493,24 @@ public class ResolveTestGenerated extends AbstractResolveTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Varargs extends AbstractResolveTest { public static class Varargs extends AbstractResolveTest {
public void testAllFilesPresentInVarargs() throws Exception { public void testAllFilesPresentInVarargs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/varargs"), Pattern.compile("^(.+)\\.resolve$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/varargs"), Pattern.compile("^(.+)\\.resolve$"), true);
} }
@TestMetadata("MoreSpecificVarargsOfEqualLength.resolve") @TestMetadata("MoreSpecificVarargsOfEqualLength.resolve")
public void testMoreSpecificVarargsOfEqualLength() throws Exception { public void testMoreSpecificVarargsOfEqualLength() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/varargs/MoreSpecificVarargsOfEqualLength.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/varargs/MoreSpecificVarargsOfEqualLength.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("NilaryVsVararg.resolve") @TestMetadata("NilaryVsVararg.resolve")
public void testNilaryVsVararg() throws Exception { public void testNilaryVsVararg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/varargs/NilaryVsVararg.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/varargs/NilaryVsVararg.resolve");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("UnaryVsVararg.resolve") @TestMetadata("UnaryVsVararg.resolve")
public void testUnaryVsVararg() throws Exception { public void testUnaryVsVararg() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolve/varargs/UnaryVsVararg.resolve"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/varargs/UnaryVsVararg.resolve");
doTest(fileName); doTest(fileName);
} }
} }
@@ -42,8 +42,8 @@ import org.jetbrains.kotlin.renderer.DescriptorRendererOptions;
import org.jetbrains.kotlin.renderer.NameShortness; import org.jetbrains.kotlin.renderer.NameShortness;
import org.jetbrains.kotlin.resolve.BindingContext; import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.scopes.KtScope; import org.jetbrains.kotlin.resolve.scopes.KtScope;
import org.jetbrains.kotlin.test.JetLiteFixture; import org.jetbrains.kotlin.test.KotlinLiteFixture;
import org.jetbrains.kotlin.test.JetTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.types.TypeProjection; import org.jetbrains.kotlin.types.TypeProjection;
import java.io.File; import java.io.File;
@@ -54,7 +54,7 @@ import java.util.List;
import static org.jetbrains.kotlin.resolve.DescriptorUtils.isNonCompanionObject; import static org.jetbrains.kotlin.resolve.DescriptorUtils.isNonCompanionObject;
public abstract class AbstractAnnotationDescriptorResolveTest extends JetLiteFixture { public abstract class AbstractAnnotationDescriptorResolveTest extends KotlinLiteFixture {
private static final DescriptorRenderer WITH_ANNOTATION_ARGUMENT_TYPES = DescriptorRenderer.Companion.withOptions( private static final DescriptorRenderer WITH_ANNOTATION_ARGUMENT_TYPES = DescriptorRenderer.Companion.withOptions(
new Function1<DescriptorRendererOptions, Unit>() { new Function1<DescriptorRendererOptions, Unit>() {
@Override @Override
@@ -75,7 +75,7 @@ public abstract class AbstractAnnotationDescriptorResolveTest extends JetLiteFix
@Override @Override
protected KotlinCoreEnvironment createEnvironment() { protected KotlinCoreEnvironment createEnvironment() {
return JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(getTestRootDisposable()); return KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(getTestRootDisposable());
} }
protected void doTest(@NotNull String content, @NotNull String expectedAnnotation) { protected void doTest(@NotNull String content, @NotNull String expectedAnnotation) {
@@ -337,8 +337,8 @@ public abstract class AbstractAnnotationDescriptorResolveTest extends JetLiteFix
@NotNull @NotNull
protected KtFile getFile(@NotNull String content) { protected KtFile getFile(@NotNull String content) {
KtFile ktFile = JetTestUtils.createFile("dummy.kt", content, getProject()); KtFile ktFile = KotlinTestUtils.createFile("dummy.kt", content, getProject());
AnalysisResult analysisResult = JetTestUtils.analyzeFile(ktFile, getEnvironment()); AnalysisResult analysisResult = KotlinTestUtils.analyzeFile(ktFile, getEnvironment());
context = analysisResult.getBindingContext(); context = analysisResult.getBindingContext();
return ktFile; return ktFile;
@@ -358,7 +358,7 @@ public abstract class AbstractAnnotationDescriptorResolveTest extends JetLiteFix
protected static String getContent(@NotNull String annotationText) throws IOException { protected static String getContent(@NotNull String annotationText) throws IOException {
File file = new File(PATH); File file = new File(PATH);
return JetTestUtils.doLoadFile(file).replaceAll("ANNOTATION", annotationText); return KotlinTestUtils.doLoadFile(file).replaceAll("ANNOTATION", annotationText);
} }
private static String renderAnnotations(Annotations annotations, @Nullable final AnnotationUseSiteTarget defaultTarget) { private static String renderAnnotations(Annotations annotations, @Nullable final AnnotationUseSiteTarget defaultTarget) {
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.resolve.annotation
import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtil
import org.jetbrains.kotlin.test.InTextDirectivesUtils import org.jetbrains.kotlin.test.InTextDirectivesUtils
import java.io.File import java.io.File
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
public abstract class AbstractAnnotationParameterTest : AbstractAnnotationDescriptorResolveTest() { public abstract class AbstractAnnotationParameterTest : AbstractAnnotationDescriptorResolveTest() {
fun doTest(path: String) { fun doTest(path: String) {
@@ -30,6 +30,6 @@ public abstract class AbstractAnnotationParameterTest : AbstractAnnotationDescri
val expected = InTextDirectivesUtils.findListWithPrefixes(fileText, "// EXPECTED: ").joinToString(", ") val expected = InTextDirectivesUtils.findListWithPrefixes(fileText, "// EXPECTED: ").joinToString(", ")
val actual = AbstractAnnotationDescriptorResolveTest.getAnnotations(classDescriptor) val actual = AbstractAnnotationDescriptorResolveTest.getAnnotations(classDescriptor)
JetTestUtils.assertEqualsToFile(File(path), fileText.replace(expected, actual)) KotlinTestUtils.assertEqualsToFile(File(path), fileText.replace(expected, actual))
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.resolve.annotation;
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 AnnotationParameterTestGenerated extends AbstractAnnotationParameterTest { public class AnnotationParameterTestGenerated extends AbstractAnnotationParameterTest {
public void testAllFilesPresentInParameters() throws Exception { public void testAllFilesPresentInParameters() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveAnnotations/parameters"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveAnnotations/parameters"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("byte.kt") @TestMetadata("byte.kt")
public void testByte() throws Exception { public void testByte() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/byte.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/byte.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("char.kt") @TestMetadata("char.kt")
public void testChar() throws Exception { public void testChar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/char.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/char.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("double.kt") @TestMetadata("double.kt")
public void testDouble() throws Exception { public void testDouble() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/double.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/double.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("float.kt") @TestMetadata("float.kt")
public void testFloat() throws Exception { public void testFloat() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/float.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/float.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("int.kt") @TestMetadata("int.kt")
public void testInt() throws Exception { public void testInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/int.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/int.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("long.kt") @TestMetadata("long.kt")
public void testLong() throws Exception { public void testLong() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/long.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/long.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("short.kt") @TestMetadata("short.kt")
public void testShort() throws Exception { public void testShort() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/short.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/short.kt");
doTest(fileName); doTest(fileName);
} }
@@ -82,216 +82,216 @@ public class AnnotationParameterTestGenerated extends AbstractAnnotationParamete
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Expressions extends AbstractAnnotationParameterTest { public static class Expressions extends AbstractAnnotationParameterTest {
public void testAllFilesPresentInExpressions() throws Exception { public void testAllFilesPresentInExpressions() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveAnnotations/parameters/expressions"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveAnnotations/parameters/expressions"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("andAnd.kt") @TestMetadata("andAnd.kt")
public void testAndAnd() throws Exception { public void testAndAnd() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("boolean.kt") @TestMetadata("boolean.kt")
public void testBoolean() throws Exception { public void testBoolean() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("char.kt") @TestMetadata("char.kt")
public void testChar() throws Exception { public void testChar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/char.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/char.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("compositeCallBinary.kt") @TestMetadata("compositeCallBinary.kt")
public void testCompositeCallBinary() throws Exception { public void testCompositeCallBinary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("divide.kt") @TestMetadata("divide.kt")
public void testDivide() throws Exception { public void testDivide() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/divide.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/divide.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("double.kt") @TestMetadata("double.kt")
public void testDouble() throws Exception { public void testDouble() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/double.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/double.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("eqeq.kt") @TestMetadata("eqeq.kt")
public void testEqeq() throws Exception { public void testEqeq() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("escapedString.kt") @TestMetadata("escapedString.kt")
public void testEscapedString() throws Exception { public void testEscapedString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("float.kt") @TestMetadata("float.kt")
public void testFloat() throws Exception { public void testFloat() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/float.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/float.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("gt.kt") @TestMetadata("gt.kt")
public void testGt() throws Exception { public void testGt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/gt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/gt.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("gteq.kt") @TestMetadata("gteq.kt")
public void testGteq() throws Exception { public void testGteq() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("infixCallBinary.kt") @TestMetadata("infixCallBinary.kt")
public void testInfixCallBinary() throws Exception { public void testInfixCallBinary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/infixCallBinary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/infixCallBinary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("intrincics.kt") @TestMetadata("intrincics.kt")
public void testIntrincics() throws Exception { public void testIntrincics() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("labeled.kt") @TestMetadata("labeled.kt")
public void testLabeled() throws Exception { public void testLabeled() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("long.kt") @TestMetadata("long.kt")
public void testLong() throws Exception { public void testLong() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/long.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/long.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("lt.kt") @TestMetadata("lt.kt")
public void testLt() throws Exception { public void testLt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/lt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/lt.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("lteq.kt") @TestMetadata("lteq.kt")
public void testLteq() throws Exception { public void testLteq() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("maxValue.kt") @TestMetadata("maxValue.kt")
public void testMaxValue() throws Exception { public void testMaxValue() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("maxValueByte.kt") @TestMetadata("maxValueByte.kt")
public void testMaxValueByte() throws Exception { public void testMaxValueByte() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("maxValueInt.kt") @TestMetadata("maxValueInt.kt")
public void testMaxValueInt() throws Exception { public void testMaxValueInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("miltiply.kt") @TestMetadata("miltiply.kt")
public void testMiltiply() throws Exception { public void testMiltiply() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("minus.kt") @TestMetadata("minus.kt")
public void testMinus() throws Exception { public void testMinus() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/minus.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/minus.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("mod.kt") @TestMetadata("mod.kt")
public void testMod() throws Exception { public void testMod() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/mod.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/mod.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("multilineString.kt") @TestMetadata("multilineString.kt")
public void testMultilineString() throws Exception { public void testMultilineString() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("not.kt") @TestMetadata("not.kt")
public void testNot() throws Exception { public void testNot() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/not.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/not.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("noteq.kt") @TestMetadata("noteq.kt")
public void testNoteq() throws Exception { public void testNoteq() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("orOr.kt") @TestMetadata("orOr.kt")
public void testOrOr() throws Exception { public void testOrOr() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("paranthesized.kt") @TestMetadata("paranthesized.kt")
public void testParanthesized() throws Exception { public void testParanthesized() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("plus.kt") @TestMetadata("plus.kt")
public void testPlus() throws Exception { public void testPlus() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/plus.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/plus.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleCallBinary.kt") @TestMetadata("simpleCallBinary.kt")
public void testSimpleCallBinary() throws Exception { public void testSimpleCallBinary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("stringPlusInt.kt") @TestMetadata("stringPlusInt.kt")
public void testStringPlusInt() throws Exception { public void testStringPlusInt() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("stringTemplate.kt") @TestMetadata("stringTemplate.kt")
public void testStringTemplate() throws Exception { public void testStringTemplate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("strings.kt") @TestMetadata("strings.kt")
public void testStrings() throws Exception { public void testStrings() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/strings.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/strings.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unaryMinus.kt") @TestMetadata("unaryMinus.kt")
public void testUnaryMinus() throws Exception { public void testUnaryMinus() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unaryPlus.kt") @TestMetadata("unaryPlus.kt")
public void testUnaryPlus() throws Exception { public void testUnaryPlus() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -17,8 +17,8 @@
package org.jetbrains.kotlin.resolve.calls package org.jetbrains.kotlin.resolve.calls
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetLiteFixture import org.jetbrains.kotlin.test.KotlinLiteFixture
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver
@@ -44,11 +44,11 @@ import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.psi.KtFile
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
public abstract class AbstractResolvedCallsTest : JetLiteFixture() { public abstract class AbstractResolvedCallsTest : KotlinLiteFixture() {
override fun createEnvironment(): KotlinCoreEnvironment = createEnvironmentWithMockJdk(ConfigurationKind.ALL) override fun createEnvironment(): KotlinCoreEnvironment = createEnvironmentWithMockJdk(ConfigurationKind.ALL)
public fun doTest(filePath: String) { public fun doTest(filePath: String) {
val text = JetTestUtils.doLoadFile(File(filePath))!! val text = KotlinTestUtils.doLoadFile(File(filePath))!!
val jetFile = KtPsiFactory(getProject()).createFile(text.replace("<caret>", "")) val jetFile = KtPsiFactory(getProject()).createFile(text.replace("<caret>", ""))
val bindingContext = JvmResolveUtil.analyzeOneFileWithJavaIntegration(jetFile, environment).bindingContext val bindingContext = JvmResolveUtil.analyzeOneFileWithJavaIntegration(jetFile, environment).bindingContext
@@ -60,7 +60,7 @@ public abstract class AbstractResolvedCallsTest : JetLiteFixture() {
else cachedCall.variableCall else cachedCall.variableCall
val resolvedCallInfoFileName = FileUtil.getNameWithoutExtension(filePath) + ".txt" val resolvedCallInfoFileName = FileUtil.getNameWithoutExtension(filePath) + ".txt"
JetTestUtils.assertEqualsToFile(File(resolvedCallInfoFileName), "$text\n\n\n${resolvedCall?.renderToText()}") KotlinTestUtils.assertEqualsToFile(File(resolvedCallInfoFileName), "$text\n\n\n${resolvedCall?.renderToText()}")
} }
open protected fun buildCachedCall( open protected fun buildCachedCall(
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.resolve.calls;
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,54 +32,54 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
public void testAllFilesPresentInResolvedCalls() throws Exception { public void testAllFilesPresentInResolvedCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("explicitReceiverIsDispatchReceiver.kt") @TestMetadata("explicitReceiverIsDispatchReceiver.kt")
public void testExplicitReceiverIsDispatchReceiver() throws Exception { public void testExplicitReceiverIsDispatchReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/explicitReceiverIsDispatchReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/explicitReceiverIsDispatchReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("explicitReceiverIsExtensionReceiver.kt") @TestMetadata("explicitReceiverIsExtensionReceiver.kt")
public void testExplicitReceiverIsExtensionReceiver() throws Exception { public void testExplicitReceiverIsExtensionReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/explicitReceiverIsExtensionReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/explicitReceiverIsExtensionReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("hasBothDispatchAndExtensionReceivers.kt") @TestMetadata("hasBothDispatchAndExtensionReceivers.kt")
public void testHasBothDispatchAndExtensionReceivers() throws Exception { public void testHasBothDispatchAndExtensionReceivers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt") @TestMetadata("hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt")
public void testHasBothDispatchAndExtensionReceiversWithoutExplicitReceiver() throws Exception { public void testHasBothDispatchAndExtensionReceiversWithoutExplicitReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitReceiverIsDispatchReceiver.kt") @TestMetadata("implicitReceiverIsDispatchReceiver.kt")
public void testImplicitReceiverIsDispatchReceiver() throws Exception { public void testImplicitReceiverIsDispatchReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/implicitReceiverIsDispatchReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/implicitReceiverIsDispatchReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitReceiverIsExtensionReceiver.kt") @TestMetadata("implicitReceiverIsExtensionReceiver.kt")
public void testImplicitReceiverIsExtensionReceiver() throws Exception { public void testImplicitReceiverIsExtensionReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/implicitReceiverIsExtensionReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/implicitReceiverIsExtensionReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("impliedThisNoExplicitReceiver.kt") @TestMetadata("impliedThisNoExplicitReceiver.kt")
public void testImpliedThisNoExplicitReceiver() throws Exception { public void testImpliedThisNoExplicitReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/impliedThisNoExplicitReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/impliedThisNoExplicitReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleCall.kt") @TestMetadata("simpleCall.kt")
public void testSimpleCall() throws Exception { public void testSimpleCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/simpleCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/simpleCall.kt");
doTest(fileName); doTest(fileName);
} }
@@ -88,7 +88,7 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Arguments extends AbstractResolvedCallsTest { public static class Arguments extends AbstractResolvedCallsTest {
public void testAllFilesPresentInArguments() throws Exception { public void testAllFilesPresentInArguments() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals") @TestMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals")
@@ -96,42 +96,42 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class FunctionLiterals extends AbstractResolvedCallsTest { public static class FunctionLiterals extends AbstractResolvedCallsTest {
public void testAllFilesPresentInFunctionLiterals() throws Exception { public void testAllFilesPresentInFunctionLiterals() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("chainedLambdas.kt") @TestMetadata("chainedLambdas.kt")
public void testChainedLambdas() throws Exception { public void testChainedLambdas() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/chainedLambdas.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/chainedLambdas.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("notInferredLambdaReturnType.kt") @TestMetadata("notInferredLambdaReturnType.kt")
public void testNotInferredLambdaReturnType() throws Exception { public void testNotInferredLambdaReturnType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaReturnType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaReturnType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("notInferredLambdaType.kt") @TestMetadata("notInferredLambdaType.kt")
public void testNotInferredLambdaType() throws Exception { public void testNotInferredLambdaType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleGenericLambda.kt") @TestMetadata("simpleGenericLambda.kt")
public void testSimpleGenericLambda() throws Exception { public void testSimpleGenericLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleGenericLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleGenericLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleLambda.kt") @TestMetadata("simpleLambda.kt")
public void testSimpleLambda() throws Exception { public void testSimpleLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleLambda.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unmappedLambda.kt") @TestMetadata("unmappedLambda.kt")
public void testUnmappedLambda() throws Exception { public void testUnmappedLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/unmappedLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/unmappedLambda.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -141,30 +141,30 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class GenericCalls extends AbstractResolvedCallsTest { public static class GenericCalls extends AbstractResolvedCallsTest {
public void testAllFilesPresentInGenericCalls() throws Exception { public void testAllFilesPresentInGenericCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/genericCalls"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/genericCalls"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("inferredParameter.kt") @TestMetadata("inferredParameter.kt")
public void testInferredParameter() throws Exception { public void testInferredParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/inferredParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/inferredParameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleGeneric.kt") @TestMetadata("simpleGeneric.kt")
public void testSimpleGeneric() throws Exception { public void testSimpleGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/simpleGeneric.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/simpleGeneric.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("uninferredParameter.kt") @TestMetadata("uninferredParameter.kt")
public void testUninferredParameter() throws Exception { public void testUninferredParameter() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameter.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameter.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("uninferredParameterTypeMismatch.kt") @TestMetadata("uninferredParameterTypeMismatch.kt")
public void testUninferredParameterTypeMismatch() throws Exception { public void testUninferredParameterTypeMismatch() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameterTypeMismatch.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameterTypeMismatch.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -174,18 +174,18 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class NamedArguments extends AbstractResolvedCallsTest { public static class NamedArguments extends AbstractResolvedCallsTest {
public void testAllFilesPresentInNamedArguments() throws Exception { public void testAllFilesPresentInNamedArguments() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/namedArguments"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/namedArguments"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("positionedAfterNamed.kt") @TestMetadata("positionedAfterNamed.kt")
public void testPositionedAfterNamed() throws Exception { public void testPositionedAfterNamed() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/namedArguments/positionedAfterNamed.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/namedArguments/positionedAfterNamed.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("shiftedArgsMatch.kt") @TestMetadata("shiftedArgsMatch.kt")
public void testShiftedArgsMatch() throws Exception { public void testShiftedArgsMatch() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/namedArguments/shiftedArgsMatch.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/namedArguments/shiftedArgsMatch.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -195,30 +195,30 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class OneArgument extends AbstractResolvedCallsTest { public static class OneArgument extends AbstractResolvedCallsTest {
public void testAllFilesPresentInOneArgument() throws Exception { public void testAllFilesPresentInOneArgument() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/oneArgument"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/oneArgument"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("argumentHasNoType.kt") @TestMetadata("argumentHasNoType.kt")
public void testArgumentHasNoType() throws Exception { public void testArgumentHasNoType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/argumentHasNoType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/argumentHasNoType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleMatch.kt") @TestMetadata("simpleMatch.kt")
public void testSimpleMatch() throws Exception { public void testSimpleMatch() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/simpleMatch.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/simpleMatch.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("typeMismatch.kt") @TestMetadata("typeMismatch.kt")
public void testTypeMismatch() throws Exception { public void testTypeMismatch() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/typeMismatch.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/typeMismatch.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("unmappedArgument.kt") @TestMetadata("unmappedArgument.kt")
public void testUnmappedArgument() throws Exception { public void testUnmappedArgument() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/unmappedArgument.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/unmappedArgument.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -228,18 +228,18 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class RealExamples extends AbstractResolvedCallsTest { public static class RealExamples extends AbstractResolvedCallsTest {
public void testAllFilesPresentInRealExamples() throws Exception { public void testAllFilesPresentInRealExamples() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/realExamples"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/realExamples"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("emptyList.kt") @TestMetadata("emptyList.kt")
public void testEmptyList() throws Exception { public void testEmptyList() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/realExamples/emptyList.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/realExamples/emptyList.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("emptyMutableList.kt") @TestMetadata("emptyMutableList.kt")
public void testEmptyMutableList() throws Exception { public void testEmptyMutableList() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/realExamples/emptyMutableList.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/realExamples/emptyMutableList.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -249,12 +249,12 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class SeveralCandidates extends AbstractResolvedCallsTest { public static class SeveralCandidates extends AbstractResolvedCallsTest {
public void testAllFilesPresentInSeveralCandidates() throws Exception { public void testAllFilesPresentInSeveralCandidates() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/severalCandidates"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/severalCandidates"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("mostSpecific.kt") @TestMetadata("mostSpecific.kt")
public void testMostSpecific() throws Exception { public void testMostSpecific() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/severalCandidates/mostSpecific.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/severalCandidates/mostSpecific.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -265,24 +265,24 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class DifferentCallElements extends AbstractResolvedCallsTest { public static class DifferentCallElements extends AbstractResolvedCallsTest {
public void testAllFilesPresentInDifferentCallElements() throws Exception { public void testAllFilesPresentInDifferentCallElements() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/differentCallElements"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/differentCallElements"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("annotationCall.kt") @TestMetadata("annotationCall.kt")
public void testAnnotationCall() throws Exception { public void testAnnotationCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("delegatorToSuperCall.kt") @TestMetadata("delegatorToSuperCall.kt")
public void testDelegatorToSuperCall() throws Exception { public void testDelegatorToSuperCall() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/delegatorToSuperCall.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/delegatorToSuperCall.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleArrayAccess.kt") @TestMetadata("simpleArrayAccess.kt")
public void testSimpleArrayAccess() throws Exception { public void testSimpleArrayAccess() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/simpleArrayAccess.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/simpleArrayAccess.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -292,42 +292,42 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Dynamic extends AbstractResolvedCallsTest { public static class Dynamic extends AbstractResolvedCallsTest {
public void testAllFilesPresentInDynamic() throws Exception { public void testAllFilesPresentInDynamic() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/dynamic"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/dynamic"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("explicitReceiverIsDispatchReceiver.kt") @TestMetadata("explicitReceiverIsDispatchReceiver.kt")
public void testExplicitReceiverIsDispatchReceiver() throws Exception { public void testExplicitReceiverIsDispatchReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsDispatchReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsDispatchReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("explicitReceiverIsExtensionReceiver.kt") @TestMetadata("explicitReceiverIsExtensionReceiver.kt")
public void testExplicitReceiverIsExtensionReceiver() throws Exception { public void testExplicitReceiverIsExtensionReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsExtensionReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsExtensionReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("hasBothDispatchAndExtensionReceivers.kt") @TestMetadata("hasBothDispatchAndExtensionReceivers.kt")
public void testHasBothDispatchAndExtensionReceivers() throws Exception { public void testHasBothDispatchAndExtensionReceivers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceivers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceivers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt") @TestMetadata("hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt")
public void testHasBothDispatchAndExtensionReceiversWithoutExplicitReceiver() throws Exception { public void testHasBothDispatchAndExtensionReceiversWithoutExplicitReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitReceiverIsDispatchReceiver.kt") @TestMetadata("implicitReceiverIsDispatchReceiver.kt")
public void testImplicitReceiverIsDispatchReceiver() throws Exception { public void testImplicitReceiverIsDispatchReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsDispatchReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsDispatchReceiver.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitReceiverIsExtensionReceiver.kt") @TestMetadata("implicitReceiverIsExtensionReceiver.kt")
public void testImplicitReceiverIsExtensionReceiver() throws Exception { public void testImplicitReceiverIsExtensionReceiver() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsExtensionReceiver.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsExtensionReceiver.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -337,42 +337,42 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class FunctionTypes extends AbstractResolvedCallsTest { public static class FunctionTypes extends AbstractResolvedCallsTest {
public void testAllFilesPresentInFunctionTypes() throws Exception { public void testAllFilesPresentInFunctionTypes() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/functionTypes"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/functionTypes"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("invokeForExtensionFunctionType.kt") @TestMetadata("invokeForExtensionFunctionType.kt")
public void testInvokeForExtensionFunctionType() throws Exception { public void testInvokeForExtensionFunctionType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/invokeForExtensionFunctionType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/invokeForExtensionFunctionType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeForFunctionType.kt") @TestMetadata("invokeForFunctionType.kt")
public void testInvokeForFunctionType() throws Exception { public void testInvokeForFunctionType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/invokeForFunctionType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/invokeForFunctionType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("valOfExtensionFunctionType.kt") @TestMetadata("valOfExtensionFunctionType.kt")
public void testValOfExtensionFunctionType() throws Exception { public void testValOfExtensionFunctionType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("valOfExtensionFunctionTypeInvoke.kt") @TestMetadata("valOfExtensionFunctionTypeInvoke.kt")
public void testValOfExtensionFunctionTypeInvoke() throws Exception { public void testValOfExtensionFunctionTypeInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("valOfFunctionType.kt") @TestMetadata("valOfFunctionType.kt")
public void testValOfFunctionType() throws Exception { public void testValOfFunctionType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("valOfFunctionTypeInvoke.kt") @TestMetadata("valOfFunctionTypeInvoke.kt")
public void testValOfFunctionTypeInvoke() throws Exception { public void testValOfFunctionTypeInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -382,66 +382,66 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Invoke extends AbstractResolvedCallsTest { public static class Invoke extends AbstractResolvedCallsTest {
public void testAllFilesPresentInInvoke() throws Exception { public void testAllFilesPresentInInvoke() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/invoke"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/invoke"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("bothReceivers.kt") @TestMetadata("bothReceivers.kt")
public void testBothReceivers() throws Exception { public void testBothReceivers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/bothReceivers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/bothReceivers.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("dispatchReceiverAsReceiverForInvoke.kt") @TestMetadata("dispatchReceiverAsReceiverForInvoke.kt")
public void testDispatchReceiverAsReceiverForInvoke() throws Exception { public void testDispatchReceiverAsReceiverForInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/dispatchReceiverAsReceiverForInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/dispatchReceiverAsReceiverForInvoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("extensionReceiverAsReceiverForInvoke.kt") @TestMetadata("extensionReceiverAsReceiverForInvoke.kt")
public void testExtensionReceiverAsReceiverForInvoke() throws Exception { public void testExtensionReceiverAsReceiverForInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/extensionReceiverAsReceiverForInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/extensionReceiverAsReceiverForInvoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitReceiverForInvoke.kt") @TestMetadata("implicitReceiverForInvoke.kt")
public void testImplicitReceiverForInvoke() throws Exception { public void testImplicitReceiverForInvoke() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/implicitReceiverForInvoke.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/implicitReceiverForInvoke.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeOnClassObject1.kt") @TestMetadata("invokeOnClassObject1.kt")
public void testInvokeOnClassObject1() throws Exception { public void testInvokeOnClassObject1() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeOnClassObject2.kt") @TestMetadata("invokeOnClassObject2.kt")
public void testInvokeOnClassObject2() throws Exception { public void testInvokeOnClassObject2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeOnEnumEntry1.kt") @TestMetadata("invokeOnEnumEntry1.kt")
public void testInvokeOnEnumEntry1() throws Exception { public void testInvokeOnEnumEntry1() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry1.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeOnEnumEntry2.kt") @TestMetadata("invokeOnEnumEntry2.kt")
public void testInvokeOnEnumEntry2() throws Exception { public void testInvokeOnEnumEntry2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry2.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry2.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeOnObject1.kt") @TestMetadata("invokeOnObject1.kt")
public void testInvokeOnObject1() throws Exception { public void testInvokeOnObject1() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnObject1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnObject1.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("invokeOnObject2.kt") @TestMetadata("invokeOnObject2.kt")
public void testInvokeOnObject2() throws Exception { public void testInvokeOnObject2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnObject2.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnObject2.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -451,24 +451,24 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ObjectsAndClassObjects extends AbstractResolvedCallsTest { public static class ObjectsAndClassObjects extends AbstractResolvedCallsTest {
public void testAllFilesPresentInObjectsAndClassObjects() throws Exception { public void testAllFilesPresentInObjectsAndClassObjects() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/objectsAndClassObjects"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/objectsAndClassObjects"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("classObject.kt") @TestMetadata("classObject.kt")
public void testClassObject() throws Exception { public void testClassObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("kt5308IntRangeConstant.kt") @TestMetadata("kt5308IntRangeConstant.kt")
public void testKt5308IntRangeConstant() throws Exception { public void testKt5308IntRangeConstant() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/kt5308IntRangeConstant.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/kt5308IntRangeConstant.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("object.kt") @TestMetadata("object.kt")
public void testObject() throws Exception { public void testObject() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/object.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/object.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -478,12 +478,12 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class RealExamples extends AbstractResolvedCallsTest { public static class RealExamples extends AbstractResolvedCallsTest {
public void testAllFilesPresentInRealExamples() throws Exception { public void testAllFilesPresentInRealExamples() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/realExamples"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/realExamples"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("stringPlusInBuilders.kt") @TestMetadata("stringPlusInBuilders.kt")
public void testStringPlusInBuilders() throws Exception { public void testStringPlusInBuilders() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -493,18 +493,18 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Resolve extends AbstractResolvedCallsTest { public static class Resolve extends AbstractResolvedCallsTest {
public void testAllFilesPresentInResolve() throws Exception { public void testAllFilesPresentInResolve() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/resolve"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/resolve"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("mostSpecificUninferredParam.kt") @TestMetadata("mostSpecificUninferredParam.kt")
public void testMostSpecificUninferredParam() throws Exception { public void testMostSpecificUninferredParam() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/resolve/mostSpecificUninferredParam.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/resolve/mostSpecificUninferredParam.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("mostSpecificWithLambda.kt") @TestMetadata("mostSpecificWithLambda.kt")
public void testMostSpecificWithLambda() throws Exception { public void testMostSpecificWithLambda() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/resolve/mostSpecificWithLambda.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/resolve/mostSpecificWithLambda.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -514,90 +514,90 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class SecondaryConstructors extends AbstractResolvedCallsTest { public static class SecondaryConstructors extends AbstractResolvedCallsTest {
public void testAllFilesPresentInSecondaryConstructors() throws Exception { public void testAllFilesPresentInSecondaryConstructors() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("classWithGenerics.kt") @TestMetadata("classWithGenerics.kt")
public void testClassWithGenerics() throws Exception { public void testClassWithGenerics() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithGenerics2.kt") @TestMetadata("classWithGenerics2.kt")
public void testClassWithGenerics2() throws Exception { public void testClassWithGenerics2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics2.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics2.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("classWithGenerics3.kt") @TestMetadata("classWithGenerics3.kt")
public void testClassWithGenerics3() throws Exception { public void testClassWithGenerics3() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics3.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics3.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("explicitPrimaryArgs.kt") @TestMetadata("explicitPrimaryArgs.kt")
public void testExplicitPrimaryArgs() throws Exception { public void testExplicitPrimaryArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("explicitPrimaryCallSecondary.kt") @TestMetadata("explicitPrimaryCallSecondary.kt")
public void testExplicitPrimaryCallSecondary() throws Exception { public void testExplicitPrimaryCallSecondary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryCallSecondary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryCallSecondary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("explicitPrimaryNoArgs.kt") @TestMetadata("explicitPrimaryNoArgs.kt")
public void testExplicitPrimaryNoArgs() throws Exception { public void testExplicitPrimaryNoArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryNoArgs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryNoArgs.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("implicitPrimary.kt") @TestMetadata("implicitPrimary.kt")
public void testImplicitPrimary() throws Exception { public void testImplicitPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/implicitPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/implicitPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overload1.kt") @TestMetadata("overload1.kt")
public void testOverload1() throws Exception { public void testOverload1() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload1.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload1.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overload2.kt") @TestMetadata("overload2.kt")
public void testOverload2() throws Exception { public void testOverload2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload2.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload2.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overload3.kt") @TestMetadata("overload3.kt")
public void testOverload3() throws Exception { public void testOverload3() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload3.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload3.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overloadDefault.kt") @TestMetadata("overloadDefault.kt")
public void testOverloadDefault() throws Exception { public void testOverloadDefault() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overloadDefault.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overloadDefault.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("overloadNamed.kt") @TestMetadata("overloadNamed.kt")
public void testOverloadNamed() throws Exception { public void testOverloadNamed() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overloadNamed.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overloadNamed.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simple.kt") @TestMetadata("simple.kt")
public void testSimple() throws Exception { public void testSimple() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/simple.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/simple.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varargs.kt") @TestMetadata("varargs.kt")
public void testVarargs() throws Exception { public void testVarargs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/varargs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/varargs.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -607,36 +607,36 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class ThisOrSuper extends AbstractResolvedCallsTest { public static class ThisOrSuper extends AbstractResolvedCallsTest {
public void testAllFilesPresentInThisOrSuper() throws Exception { public void testAllFilesPresentInThisOrSuper() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/thisOrSuper"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/thisOrSuper"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("labeledSuper.kt") @TestMetadata("labeledSuper.kt")
public void testLabeledSuper() throws Exception { public void testLabeledSuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/labeledSuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/labeledSuper.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("labeledThis.kt") @TestMetadata("labeledThis.kt")
public void testLabeledThis() throws Exception { public void testLabeledThis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/labeledThis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/labeledThis.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleSuper.kt") @TestMetadata("simpleSuper.kt")
public void testSimpleSuper() throws Exception { public void testSimpleSuper() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/simpleSuper.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/simpleSuper.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("simpleThis.kt") @TestMetadata("simpleThis.kt")
public void testSimpleThis() throws Exception { public void testSimpleThis() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/simpleThis.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/simpleThis.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisInExtensionFunction.kt") @TestMetadata("thisInExtensionFunction.kt")
public void testThisInExtensionFunction() throws Exception { public void testThisInExtensionFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/thisInExtensionFunction.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/thisInExtensionFunction.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.resolve.calls;
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,132 +32,132 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public class ResolvedConstructorDelegationCallsTestsGenerated extends AbstractResolvedConstructorDelegationCallsTests { public class ResolvedConstructorDelegationCallsTestsGenerated extends AbstractResolvedConstructorDelegationCallsTests {
public void testAllFilesPresentInResolveConstructorDelegationCalls() throws Exception { public void testAllFilesPresentInResolveConstructorDelegationCalls() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveConstructorDelegationCalls"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveConstructorDelegationCalls"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("classWithGenerics.kt") @TestMetadata("classWithGenerics.kt")
public void testClassWithGenerics() throws Exception { public void testClassWithGenerics() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/classWithGenerics.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/classWithGenerics.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("generics2.kt") @TestMetadata("generics2.kt")
public void testGenerics2() throws Exception { public void testGenerics2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics2.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics2.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("generics3.kt") @TestMetadata("generics3.kt")
public void testGenerics3() throws Exception { public void testGenerics3() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics3.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics3.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("generics4.kt") @TestMetadata("generics4.kt")
public void testGenerics4() throws Exception { public void testGenerics4() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics4.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics4.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("generics5.kt") @TestMetadata("generics5.kt")
public void testGenerics5() throws Exception { public void testGenerics5() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics5.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics5.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("inheritanceWithGeneric.kt") @TestMetadata("inheritanceWithGeneric.kt")
public void testInheritanceWithGeneric() throws Exception { public void testInheritanceWithGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/inheritanceWithGeneric.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/inheritanceWithGeneric.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClassDelegatingPrimary.kt") @TestMetadata("innerClassDelegatingPrimary.kt")
public void testInnerClassDelegatingPrimary() throws Exception { public void testInnerClassDelegatingPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("innerClassDelegatingSecondary.kt") @TestMetadata("innerClassDelegatingSecondary.kt")
public void testInnerClassDelegatingSecondary() throws Exception { public void testInnerClassDelegatingSecondary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingSecondary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingSecondary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superAnyEmpty.kt") @TestMetadata("superAnyEmpty.kt")
public void testSuperAnyEmpty() throws Exception { public void testSuperAnyEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superAnyEmpty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superAnyEmpty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superAnyImplicit.kt") @TestMetadata("superAnyImplicit.kt")
public void testSuperAnyImplicit() throws Exception { public void testSuperAnyImplicit() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superAnyImplicit.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superAnyImplicit.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superPrimary.kt") @TestMetadata("superPrimary.kt")
public void testSuperPrimary() throws Exception { public void testSuperPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superPrimaryEmpty.kt") @TestMetadata("superPrimaryEmpty.kt")
public void testSuperPrimaryEmpty() throws Exception { public void testSuperPrimaryEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superPrimaryImplicit.kt") @TestMetadata("superPrimaryImplicit.kt")
public void testSuperPrimaryImplicit() throws Exception { public void testSuperPrimaryImplicit() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superSecondary.kt") @TestMetadata("superSecondary.kt")
public void testSuperSecondary() throws Exception { public void testSuperSecondary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superSecondaryImplicit.kt") @TestMetadata("superSecondaryImplicit.kt")
public void testSuperSecondaryImplicit() throws Exception { public void testSuperSecondaryImplicit() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("superSecondaryOverload.kt") @TestMetadata("superSecondaryOverload.kt")
public void testSuperSecondaryOverload() throws Exception { public void testSuperSecondaryOverload() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisPrimary.kt") @TestMetadata("thisPrimary.kt")
public void testThisPrimary() throws Exception { public void testThisPrimary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisPrimary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisPrimary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisPrimaryEmpty.kt") @TestMetadata("thisPrimaryEmpty.kt")
public void testThisPrimaryEmpty() throws Exception { public void testThisPrimaryEmpty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisPrimaryEmpty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisPrimaryEmpty.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisSecondary.kt") @TestMetadata("thisSecondary.kt")
public void testThisSecondary() throws Exception { public void testThisSecondary() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisSecondary.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisSecondary.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("thisSecondaryOverload.kt") @TestMetadata("thisSecondaryOverload.kt")
public void testThisSecondaryOverload() throws Exception { public void testThisSecondaryOverload() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisSecondaryOverload.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisSecondaryOverload.kt");
doTest(fileName); doTest(fileName);
} }
@TestMetadata("varargs.kt") @TestMetadata("varargs.kt")
public void testVarargs() throws Exception { public void testVarargs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/varargs.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/varargs.kt");
doTest(fileName); doTest(fileName);
} }
} }
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.resolve.constants.CompileTimeConstant
import org.jetbrains.kotlin.resolve.constants.StringValue import org.jetbrains.kotlin.resolve.constants.StringValue
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
import org.jetbrains.kotlin.test.InTextDirectivesUtils import org.jetbrains.kotlin.test.InTextDirectivesUtils
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.File import java.io.File
import java.util.regex.Pattern import java.util.regex.Pattern
@@ -99,7 +99,7 @@ public abstract class AbstractCompileTimeConstantEvaluatorTest : AbstractAnnotat
actualFileText = actualFileText.replace(expected, actual) actualFileText = actualFileText.replace(expected, actual)
} }
JetTestUtils.assertEqualsToFile(myFile, actualFileText) KotlinTestUtils.assertEqualsToFile(myFile, actualFileText)
} }
fun getObjectsToTest(fileText: String): List<String> { fun getObjectsToTest(fileText: String): List<String> {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.resolve.constants.evaluate;
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,126 +34,126 @@ public class CompileTimeConstantEvaluatorTestGenerated extends AbstractCompileTi
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class Constant extends AbstractCompileTimeConstantEvaluatorTest { public static class Constant extends AbstractCompileTimeConstantEvaluatorTest {
public void testAllFilesPresentInConstant() throws Exception { public void testAllFilesPresentInConstant() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/constant"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/constant"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("classObjectProperty.kt") @TestMetadata("classObjectProperty.kt")
public void testClassObjectProperty() throws Exception { public void testClassObjectProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/classObjectProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/classObjectProperty.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("compareTo.kt") @TestMetadata("compareTo.kt")
public void testCompareTo() throws Exception { public void testCompareTo() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/compareTo.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/compareTo.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("differentTypes.kt") @TestMetadata("differentTypes.kt")
public void testDifferentTypes() throws Exception { public void testDifferentTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/differentTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/differentTypes.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("divideByZero.kt") @TestMetadata("divideByZero.kt")
public void testDivideByZero() throws Exception { public void testDivideByZero() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/divideByZero.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/divideByZero.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("equals.kt") @TestMetadata("equals.kt")
public void testEquals() throws Exception { public void testEquals() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/equals.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/equals.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("exceptionWhenEvaluate.kt") @TestMetadata("exceptionWhenEvaluate.kt")
public void testExceptionWhenEvaluate() throws Exception { public void testExceptionWhenEvaluate() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/exceptionWhenEvaluate.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/exceptionWhenEvaluate.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("finalProperty.kt") @TestMetadata("finalProperty.kt")
public void testFinalProperty() throws Exception { public void testFinalProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/finalProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/finalProperty.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("float.kt") @TestMetadata("float.kt")
public void testFloat() throws Exception { public void testFloat() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/float.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/float.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("floatsAndDoubles.kt") @TestMetadata("floatsAndDoubles.kt")
public void testFloatsAndDoubles() throws Exception { public void testFloatsAndDoubles() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/floatsAndDoubles.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/floatsAndDoubles.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("integer.kt") @TestMetadata("integer.kt")
public void testInteger() throws Exception { public void testInteger() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integer.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integer.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("integers.kt") @TestMetadata("integers.kt")
public void testIntegers() throws Exception { public void testIntegers() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integers.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integers.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("localVal.kt") @TestMetadata("localVal.kt")
public void testLocalVal() throws Exception { public void testLocalVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/localVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/localVal.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("localVar.kt") @TestMetadata("localVar.kt")
public void testLocalVar() throws Exception { public void testLocalVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/localVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/localVar.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("nonFinalProperty.kt") @TestMetadata("nonFinalProperty.kt")
public void testNonFinalProperty() throws Exception { public void testNonFinalProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/nonFinalProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/nonFinalProperty.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("objectProperty.kt") @TestMetadata("objectProperty.kt")
public void testObjectProperty() throws Exception { public void testObjectProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/objectProperty.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/objectProperty.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("strings.kt") @TestMetadata("strings.kt")
public void testStrings() throws Exception { public void testStrings() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/strings.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/strings.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("topLevelVal.kt") @TestMetadata("topLevelVal.kt")
public void testTopLevelVal() throws Exception { public void testTopLevelVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/topLevelVal.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/topLevelVal.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("topLevelVar.kt") @TestMetadata("topLevelVar.kt")
public void testTopLevelVar() throws Exception { public void testTopLevelVar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/topLevelVar.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/topLevelVar.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("unaryMinusIndepWoExpType.kt") @TestMetadata("unaryMinusIndepWoExpType.kt")
public void testUnaryMinusIndepWoExpType() throws Exception { public void testUnaryMinusIndepWoExpType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
@TestMetadata("unaryMinusIndependentExpType.kt") @TestMetadata("unaryMinusIndependentExpType.kt")
public void testUnaryMinusIndependentExpType() throws Exception { public void testUnaryMinusIndependentExpType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt");
doConstantTest(fileName); doConstantTest(fileName);
} }
} }
@@ -163,36 +163,36 @@ public class CompileTimeConstantEvaluatorTestGenerated extends AbstractCompileTi
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class IsPure extends AbstractCompileTimeConstantEvaluatorTest { public static class IsPure extends AbstractCompileTimeConstantEvaluatorTest {
public void testAllFilesPresentInIsPure() throws Exception { public void testAllFilesPresentInIsPure() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/isPure"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/isPure"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("innerToType.kt") @TestMetadata("innerToType.kt")
public void testInnerToType() throws Exception { public void testInnerToType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/innerToType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/innerToType.kt");
doIsPureTest(fileName); doIsPureTest(fileName);
} }
@TestMetadata("namedConstants.kt") @TestMetadata("namedConstants.kt")
public void testNamedConstants() throws Exception { public void testNamedConstants() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/namedConstants.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/namedConstants.kt");
doIsPureTest(fileName); doIsPureTest(fileName);
} }
@TestMetadata("toType.kt") @TestMetadata("toType.kt")
public void testToType() throws Exception { public void testToType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/toType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/toType.kt");
doIsPureTest(fileName); doIsPureTest(fileName);
} }
@TestMetadata("unaryMinusIndepWoExpType.kt") @TestMetadata("unaryMinusIndepWoExpType.kt")
public void testUnaryMinusIndepWoExpType() throws Exception { public void testUnaryMinusIndepWoExpType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/unaryMinusIndepWoExpType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/unaryMinusIndepWoExpType.kt");
doIsPureTest(fileName); doIsPureTest(fileName);
} }
@TestMetadata("unaryMinusIndependentExpType.kt") @TestMetadata("unaryMinusIndependentExpType.kt")
public void testUnaryMinusIndependentExpType() throws Exception { public void testUnaryMinusIndependentExpType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/unaryMinusIndependentExpType.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/unaryMinusIndependentExpType.kt");
doIsPureTest(fileName); doIsPureTest(fileName);
} }
} }
@@ -202,30 +202,30 @@ public class CompileTimeConstantEvaluatorTestGenerated extends AbstractCompileTi
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
public static class UsesVariableAsConstant extends AbstractCompileTimeConstantEvaluatorTest { public static class UsesVariableAsConstant extends AbstractCompileTimeConstantEvaluatorTest {
public void testAllFilesPresentInUsesVariableAsConstant() throws Exception { public void testAllFilesPresentInUsesVariableAsConstant() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/usesVariableAsConstant"), Pattern.compile("^(.+)\\.kt$"), true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/usesVariableAsConstant"), Pattern.compile("^(.+)\\.kt$"), true);
} }
@TestMetadata("binaryTypes.kt") @TestMetadata("binaryTypes.kt")
public void testBinaryTypes() throws Exception { public void testBinaryTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/binaryTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/binaryTypes.kt");
doUsesVariableAsConstantTest(fileName); doUsesVariableAsConstantTest(fileName);
} }
@TestMetadata("NamedConstants.kt") @TestMetadata("NamedConstants.kt")
public void testNamedConstants() throws Exception { public void testNamedConstants() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/NamedConstants.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/NamedConstants.kt");
doUsesVariableAsConstantTest(fileName); doUsesVariableAsConstantTest(fileName);
} }
@TestMetadata("OtherTypes.kt") @TestMetadata("OtherTypes.kt")
public void testOtherTypes() throws Exception { public void testOtherTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/OtherTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/OtherTypes.kt");
doUsesVariableAsConstantTest(fileName); doUsesVariableAsConstantTest(fileName);
} }
@TestMetadata("simpleTypes.kt") @TestMetadata("simpleTypes.kt")
public void testSimpleTypes() throws Exception { public void testSimpleTypes() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/simpleTypes.kt"); String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/simpleTypes.kt");
doUsesVariableAsConstantTest(fileName); doUsesVariableAsConstantTest(fileName);
} }
} }
@@ -26,8 +26,8 @@ import org.jetbrains.kotlin.resolve.calls.inference.constraintPosition.Constrain
import org.jetbrains.kotlin.resolve.calls.inference.registerTypeVariables import org.jetbrains.kotlin.resolve.calls.inference.registerTypeVariables
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.JetLiteFixture import org.jetbrains.kotlin.test.KotlinLiteFixture
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.tests.di.createContainerForTests import org.jetbrains.kotlin.tests.di.createContainerForTests
import org.jetbrains.kotlin.types.ErrorUtils import org.jetbrains.kotlin.types.ErrorUtils
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
@@ -35,7 +35,7 @@ import org.jetbrains.kotlin.types.Variance
import java.io.File import java.io.File
import java.util.ArrayList import java.util.ArrayList
abstract public class AbstractConstraintSystemTest() : JetLiteFixture() { abstract public class AbstractConstraintSystemTest() : KotlinLiteFixture() {
private var _typeResolver: TypeResolver? = null private var _typeResolver: TypeResolver? = null
private val typeResolver: TypeResolver private val typeResolver: TypeResolver
@@ -52,14 +52,14 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
_typeResolver = createContainerForTests(getProject(), JetTestUtils.createEmptyModule()).typeResolver _typeResolver = createContainerForTests(getProject(), KotlinTestUtils.createEmptyModule()).typeResolver
_testDeclarations = analyzeDeclarations() _testDeclarations = analyzeDeclarations()
} }
override fun tearDown() { override fun tearDown() {
_typeResolver = null _typeResolver = null
_testDeclarations = null _testDeclarations = null
super<JetLiteFixture>.tearDown() super<KotlinLiteFixture>.tearDown()
} }
override fun getTestDataPath(): String { override fun getTestDataPath(): String {
@@ -113,7 +113,7 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() {
}.join("\n", prefix = "result:\n") }.join("\n", prefix = "result:\n")
val boundsFile = File(filePath.replace("constraints", "bounds")) val boundsFile = File(filePath.replace("constraints", "bounds"))
JetTestUtils.assertEqualsToFile(boundsFile, "${constraintsFileText.join("\n")}\n\n$resultingStatus\n\n$result") KotlinTestUtils.assertEqualsToFile(boundsFile, "${constraintsFileText.join("\n")}\n\n$resultingStatus\n\n$result")
} }
class MyConstraint(val kind: MyConstraintKind, val firstType: String, val secondType: String) class MyConstraint(val kind: MyConstraintKind, val firstType: String, val secondType: String)
@@ -29,7 +29,7 @@ import org.jetbrains.kotlin.resolve.constants.IntegerValueTypeConstructor
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
import org.jetbrains.kotlin.resolve.scopes.KtScope import org.jetbrains.kotlin.resolve.scopes.KtScope
import org.jetbrains.kotlin.resolve.scopes.LexicalScope import org.jetbrains.kotlin.resolve.scopes.LexicalScope
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
import org.jetbrains.kotlin.types.KotlinTypeImpl import org.jetbrains.kotlin.types.KotlinTypeImpl
import java.util.regex.Pattern import java.util.regex.Pattern
@@ -70,8 +70,8 @@ public class ConstraintSystemTestData(
) )
} }
return typeResolver.resolveType( return typeResolver.resolveType(
scopeToResolveTypeParameters, KtPsiFactory(project).createType(name), scopeToResolveTypeParameters, KtPsiFactory(project).createType(name),
JetTestUtils.DUMMY_TRACE, true) KotlinTestUtils.DUMMY_TRACE, true)
} }
} }
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.resolve.typeApproximation package org.jetbrains.kotlin.resolve.typeApproximation
import org.jetbrains.kotlin.test.JetLiteFixture import org.jetbrains.kotlin.test.KotlinLiteFixture
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.ConfigurationKind
import java.io.File import java.io.File
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.types.TypeProjectionImpl
import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.types.Variance.* import org.jetbrains.kotlin.types.Variance.*
import org.jetbrains.kotlin.types.typesApproximation.approximateCapturedTypes import org.jetbrains.kotlin.types.typesApproximation.approximateCapturedTypes
import org.jetbrains.kotlin.test.JetTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.psi.KtPsiFactory import org.jetbrains.kotlin.psi.KtPsiFactory
import org.jetbrains.kotlin.resolve.calls.inference.createCapturedType import org.jetbrains.kotlin.resolve.calls.inference.createCapturedType
import org.jetbrains.kotlin.diagnostics.Severity import org.jetbrains.kotlin.diagnostics.Severity
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.types.TypeProjection
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
public class CapturedTypeApproximationTest() : JetLiteFixture() { public class CapturedTypeApproximationTest() : KotlinLiteFixture() {
override fun getTestDataPath() = "compiler/testData/capturedTypeApproximation/" override fun getTestDataPath() = "compiler/testData/capturedTypeApproximation/"
@@ -47,7 +47,7 @@ public class CapturedTypeApproximationTest() : JetLiteFixture() {
assert(substitutions.size() in 1..2) { "Captured type approximation test requires substitutions for (T) or (T, R)" } assert(substitutions.size() in 1..2) { "Captured type approximation test requires substitutions for (T) or (T, R)" }
val oneTypeVariable = substitutions.size() == 1 val oneTypeVariable = substitutions.size() == 1
val declarationsText = JetTestUtils.doLoadFile(File(getTestDataPath() + "/declarations.kt")) val declarationsText = KotlinTestUtils.doLoadFile(File(getTestDataPath() + "/declarations.kt"))
fun analyzeTestFile(testType: String) = run { fun analyzeTestFile(testType: String) = run {
val test = declarationsText.replace("#TestType#", testType) val test = declarationsText.replace("#TestType#", testType)
@@ -124,7 +124,7 @@ public class CapturedTypeApproximationTest() : JetLiteFixture() {
} }
} }
JetTestUtils.assertEqualsToFile(File(getTestDataPath() + "/" + filePath), result.toString()) KotlinTestUtils.assertEqualsToFile(File(getTestDataPath() + "/" + filePath), result.toString())
} }
private fun getTypePatternsForOneTypeVariable() = listOf("In<#T#>", "Out<#T#>", "Inv<#T#>", "Inv<in #T#>", "Inv<out #T#>") private fun getTypePatternsForOneTypeVariable() = listOf("In<#T#>", "Out<#T#>", "Inv<#T#>", "Inv<in #T#>", "Inv<out #T#>")

Some files were not shown because too many files have changed in this diff Show More