diff --git a/compiler/testData/codegen/java8/bytecodeText/hashCode/dataClass.kt b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/dataClass.kt similarity index 100% rename from compiler/testData/codegen/java8/bytecodeText/hashCode/dataClass.kt rename to compiler/testData/codegen/bytecodeText/jvm8/hashCode/dataClass.kt diff --git a/compiler/testData/codegen/java8/bytecodeText/hashCode/hashCode.kt b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt similarity index 100% rename from compiler/testData/codegen/java8/bytecodeText/hashCode/hashCode.kt rename to compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt diff --git a/compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/defaultArgs.kt b/compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/defaultArgs.kt similarity index 100% rename from compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/defaultArgs.kt rename to compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/defaultArgs.kt diff --git a/compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleFunction.kt b/compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunction.kt similarity index 100% rename from compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleFunction.kt rename to compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunction.kt diff --git a/compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt b/compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt similarity index 100% rename from compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt rename to compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt diff --git a/compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleProperty.kt b/compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleProperty.kt similarity index 100% rename from compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleProperty.kt rename to compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleProperty.kt diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java deleted file mode 100644 index fe066da2247..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.codegen; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/codegen/java8/bytecodeText") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class BytecodeTextJava8TestGenerated extends AbstractBytecodeTextTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInBytecodeText() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/testData/codegen/java8/bytecodeText/hashCode") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class HashCode extends AbstractBytecodeTextTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInHashCode() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("dataClass.kt") - public void testDataClass() throws Exception { - runTest("compiler/testData/codegen/java8/bytecodeText/hashCode/dataClass.kt"); - } - - @TestMetadata("hashCode.kt") - public void testHashCode() throws Exception { - runTest("compiler/testData/codegen/java8/bytecodeText/hashCode/hashCode.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/java8/bytecodeText/jvmDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmDefault extends AbstractBytecodeTextTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInJvmDefault() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Compatibility extends AbstractBytecodeTextTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInCompatibility() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("defaultArgs.kt") - public void testDefaultArgs() throws Exception { - runTest("compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/defaultArgs.kt"); - } - - @TestMetadata("simpleFunction.kt") - public void testSimpleFunction() throws Exception { - runTest("compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleFunction.kt"); - } - - @TestMetadata("simpleFunctionWithAbstractOverride.kt") - public void testSimpleFunctionWithAbstractOverride() throws Exception { - runTest("compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/java8/bytecodeText/jvmDefault/compatibility/simpleProperty.kt"); - } - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt index f2f2c897726..1f158bb8fb1 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt @@ -70,9 +70,5 @@ fun main(args: Array) { testClass { model("codegen/java8/compileKotlinAgainstKotlin") } - - testClass("BytecodeTextJava8TestGenerated") { - model("codegen/java8/bytecodeText") - } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index 22f39499bf9..6c870322205 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -2389,6 +2389,88 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { } } + @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/hashCode") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class HashCode extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInHashCode() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("dataClass.kt") + public void testDataClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/jvm8/hashCode/dataClass.kt"); + } + + @TestMetadata("hashCode.kt") + public void testHashCode() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmDefault extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("defaultArgs.kt") + public void testDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/defaultArgs.kt"); + } + + @TestMetadata("simpleFunction.kt") + public void testSimpleFunction() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunction.kt"); + } + + @TestMetadata("simpleFunctionWithAbstractOverride.kt") + public void testSimpleFunctionWithAbstractOverride() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleFunctionWithAbstractOverride.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility/simpleProperty.kt"); + } + } + } + } + @TestMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)