diff --git a/compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAccessors.kt b/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAccessors.kt rename to compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt diff --git a/compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAnnotation.kt b/compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAnnotation.kt rename to compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt diff --git a/compiler/testData/codegen/java8/writeFlags/defaults/defaultMethod.kt b/compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/defaults/defaultMethod.kt rename to compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt diff --git a/compiler/testData/codegen/java8/writeFlags/defaults/defaultProperty.kt b/compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/defaults/defaultProperty.kt rename to compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt diff --git a/compiler/testData/codegen/java8/writeFlags/defaults/propertyAnnotation.kt b/compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/defaults/propertyAnnotation.kt rename to compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt diff --git a/compiler/testData/codegen/java8/writeFlags/interfaceMethod.kt b/compiler/testData/writeFlags/jvm8/interfaceMethod.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/interfaceMethod.kt rename to compiler/testData/writeFlags/jvm8/interfaceMethod.kt diff --git a/compiler/testData/codegen/java8/writeFlags/interfaceProperty.kt b/compiler/testData/writeFlags/jvm8/interfaceProperty.kt similarity index 100% rename from compiler/testData/codegen/java8/writeFlags/interfaceProperty.kt rename to compiler/testData/writeFlags/jvm8/interfaceProperty.kt diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java deleted file mode 100644 index e18cd27b064..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java +++ /dev/null @@ -1,92 +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.flags; - -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/writeFlags") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInWriteFlags() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/writeFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("interfaceMethod.kt") - public void testInterfaceMethod() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/interfaceMethod.kt"); - } - - @TestMetadata("interfaceProperty.kt") - public void testInterfaceProperty() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/interfaceProperty.kt"); - } - - @TestMetadata("compiler/testData/codegen/java8/writeFlags/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractWriteFlagsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/writeFlags/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("defaultMethod.kt") - public void testDefaultMethod() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/defaults/defaultMethod.kt"); - } - - @TestMetadata("defaultProperty.kt") - public void testDefaultProperty() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/defaults/defaultProperty.kt"); - } - - @TestMetadata("propertyAnnotation.kt") - public void testPropertyAnnotation() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/defaults/propertyAnnotation.kt"); - } - - @TestMetadata("compiler/testData/codegen/java8/writeFlags/defaults/compatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Compatibility extends AbstractWriteFlagsTest { - 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/writeFlags/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("propertyAccessors.kt") - public void testPropertyAccessors() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAccessors.kt"); - } - - @TestMetadata("propertyAnnotation.kt") - public void testPropertyAnnotation() throws Exception { - runTest("compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAnnotation.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 ffe963603bb..f2f2c897726 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 @@ -71,10 +71,6 @@ fun main(args: Array) { model("codegen/java8/compileKotlinAgainstKotlin") } - testClass { - model("codegen/java8/writeFlags") - } - testClass("BytecodeTextJava8TestGenerated") { model("codegen/java8/bytecodeText") } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java index d73cfb4ef97..cf25891c0b2 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java @@ -707,6 +707,80 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { } } + @TestMetadata("compiler/testData/writeFlags/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractWriteFlagsTest { + 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/writeFlags/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("interfaceMethod.kt") + public void testInterfaceMethod() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/interfaceMethod.kt"); + } + + @TestMetadata("interfaceProperty.kt") + public void testInterfaceProperty() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/interfaceProperty.kt"); + } + + @TestMetadata("compiler/testData/writeFlags/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("defaultMethod.kt") + public void testDefaultMethod() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/defaultMethod.kt"); + } + + @TestMetadata("defaultProperty.kt") + public void testDefaultProperty() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/defaultProperty.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/propertyAnnotation.kt"); + } + + @TestMetadata("compiler/testData/writeFlags/jvm8/defaults/compatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Compatibility extends AbstractWriteFlagsTest { + 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/writeFlags/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("propertyAccessors.kt") + public void testPropertyAccessors() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAccessors.kt"); + } + + @TestMetadata("propertyAnnotation.kt") + public void testPropertyAnnotation() throws Exception { + runTest("compiler/testData/writeFlags/jvm8/defaults/compatibility/propertyAnnotation.kt"); + } + } + } + } + @TestMetadata("compiler/testData/writeFlags/lambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)