diff --git a/compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt similarity index 100% rename from compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt rename to compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt diff --git a/compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt similarity index 100% rename from compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt rename to compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt diff --git a/compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatEquals10.kt similarity index 100% rename from compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt rename to compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatEquals10.kt diff --git a/compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt similarity index 100% rename from compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt rename to compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt diff --git a/compiler/testData/codegen/box/ieee754/when10.kt b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/when10.kt similarity index 96% rename from compiler/testData/codegen/box/ieee754/when10.kt rename to compiler/testData/codegen/box/ieee754/oldLanguageVersions/when10.kt index 3410424501e..a209c9b8451 100644 --- a/compiler/testData/codegen/box/ieee754/when10.kt +++ b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/when10.kt @@ -1,7 +1,6 @@ // !LANGUAGE: -ProperIeee754Comparisons // !API_VERSION: 1.0 // IGNORE_BACKEND: NATIVE -// IGNORE_BACKEND: JVM_IR // DONT_TARGET_EXACT_BACKEND: JS_IR fun box(): String { diff --git a/compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt b/compiler/testData/codegen/box/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt similarity index 100% rename from compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt rename to compiler/testData/codegen/box/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt diff --git a/compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt b/compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt deleted file mode 100644 index dd3ec4586ba..00000000000 --- a/compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt +++ /dev/null @@ -1,34 +0,0 @@ -// !LANGUAGE: +ProperIeee754Comparisons - -fun box(): String { - val plusZero: Any = 0.0 - val minusZero: Any = -0.0 - val nullDouble: Double? = null - if (plusZero is Double) { - when (plusZero) { - nullDouble -> { - return "fail 1" - } - -0.0 -> { - } - else -> { - return "fail 2" - } - } - - if (minusZero is Double) { - when (plusZero) { - nullDouble -> { - return "fail 3" - } - minusZero -> { - } - else -> { - return "fail 4" - } - } - } - } - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt b/compiler/testData/codegen/box/operatorConventions/oldLanguageVersions/percentAsModOnBigIntegerWithoutRem.kt similarity index 100% rename from compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt rename to compiler/testData/codegen/box/operatorConventions/oldLanguageVersions/percentAsModOnBigIntegerWithoutRem.kt diff --git a/compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt index c04a9ef04ec..c85ee6793b9 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun myEquals(a: Double?, b: Double?) = a == b diff --git a/compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt index 5468318522c..eccf8822717 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun myNotEquals(a: Double?, b: Double?) = a != b diff --git a/compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatEquals10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatEquals10.kt index 8b4c58996b0..d362657b066 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatEquals10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun myEquals(a: Float?, b: Float?) = a == b diff --git a/compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt index 8c156434432..fa42ff1511c 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun myNotEquals(a: Float?, b: Float?) = a != b diff --git a/compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForDouble10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForDouble10.kt index c18ee95ae23..f8df33f71ce 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForDouble10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun equals5(a: Any?, b: Any?) = if (a is Double && b is Double?) a == b else null!! diff --git a/compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForFloat10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForFloat10.kt index 2a53685af83..b2305921b35 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForFloat10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun equals5(a: Any?, b: Any?) = if (a is Float && b is Float?) a == b else null!! diff --git a/compiler/testData/codegen/bytecodeText/ieee754/when10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/when10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/when10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/when10.kt index a4ca6dccc54..7e24c887fcb 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/when10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/when10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun box(): String { val plusZero: Any = 0.0 diff --git a/compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt similarity index 96% rename from compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt rename to compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt index 0cde12d452b..77c857700e8 100644 --- a/compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt +++ b/compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt @@ -1,5 +1,4 @@ // !API_VERSION: 1.0 -// IGNORE_BACKEND: JVM_IR fun box(): String { val nullValue: Any? = null diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index f58c66c7c25..69fad507969 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -12034,11 +12034,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); @@ -12049,31 +12044,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); @@ -12119,16 +12099,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/when.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10.kt"); - } - - @TestMetadata("when10_properIeeeComparisons.kt") - public void testWhen10_properIeeeComparisons() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - } - @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); @@ -12144,15 +12114,53 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - } - @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } + + @TestMetadata("compiler/testData/codegen/box/ieee754/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("nullableDoubleEquals10.kt") + public void testNullableDoubleEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt"); + } + + @TestMetadata("nullableDoubleNotEquals10.kt") + public void testNullableDoubleNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt"); + } + + @TestMetadata("nullableFloatEquals10.kt") + public void testNullableFloatEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatEquals10.kt"); + } + + @TestMetadata("nullableFloatNotEquals10.kt") + public void testNullableFloatNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt"); + } + + @TestMetadata("when10.kt") + public void testWhen10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/when10.kt"); + } + + @TestMetadata("whenNullableSmartCast10.kt") + public void testWhenNullableSmartCast10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/increment") @@ -17380,11 +17388,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } - @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") - public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { - runTest("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); - } - @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); @@ -17462,6 +17465,24 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") + public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions/percentAsModOnBigIntegerWithoutRem.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/optimizations") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index c92d9f786d1..e812bd57b65 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -2189,79 +2189,92 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("smartCastsForDouble.kt") public void testSmartCastsForDouble() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble.kt"); } - @TestMetadata("smartCastsForDouble10.kt") - public void testSmartCastsForDouble10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt"); - } - @TestMetadata("smartCastsForFloat.kt") public void testSmartCastsForFloat() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat.kt"); } - @TestMetadata("smartCastsForFloat10.kt") - public void testSmartCastsForFloat10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt"); - } - @TestMetadata("when.kt") public void testWhen() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/when.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/when10.kt"); - } - @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast.kt"); } - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt"); + @TestMetadata("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("nullableDoubleEquals10.kt") + public void testNullableDoubleEquals10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt"); + } + + @TestMetadata("nullableDoubleNotEquals10.kt") + public void testNullableDoubleNotEquals10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt"); + } + + @TestMetadata("nullableFloatEquals10.kt") + public void testNullableFloatEquals10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatEquals10.kt"); + } + + @TestMetadata("nullableFloatNotEquals10.kt") + public void testNullableFloatNotEquals10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt"); + } + + @TestMetadata("smartCastsForDouble10.kt") + public void testSmartCastsForDouble10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForDouble10.kt"); + } + + @TestMetadata("smartCastsForFloat10.kt") + public void testSmartCastsForFloat10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/smartCastsForFloat10.kt"); + } + + @TestMetadata("when10.kt") + public void testWhen10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/when10.kt"); + } + + @TestMetadata("whenNullableSmartCast10.kt") + public void testWhenNullableSmartCast10() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt"); + } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 1c09e5bbbf1..489662cac5c 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -12034,11 +12034,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); @@ -12049,31 +12044,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); @@ -12119,16 +12099,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/when.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10.kt"); - } - - @TestMetadata("when10_properIeeeComparisons.kt") - public void testWhen10_properIeeeComparisons() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - } - @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); @@ -12144,15 +12114,53 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - } - @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } + + @TestMetadata("compiler/testData/codegen/box/ieee754/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("nullableDoubleEquals10.kt") + public void testNullableDoubleEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt"); + } + + @TestMetadata("nullableDoubleNotEquals10.kt") + public void testNullableDoubleNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt"); + } + + @TestMetadata("nullableFloatEquals10.kt") + public void testNullableFloatEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatEquals10.kt"); + } + + @TestMetadata("nullableFloatNotEquals10.kt") + public void testNullableFloatNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt"); + } + + @TestMetadata("when10.kt") + public void testWhen10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/when10.kt"); + } + + @TestMetadata("whenNullableSmartCast10.kt") + public void testWhenNullableSmartCast10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/increment") @@ -17380,11 +17388,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } - @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") - public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { - runTest("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); - } - @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); @@ -17462,6 +17465,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); + } + + @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") + public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions/percentAsModOnBigIntegerWithoutRem.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/optimizations") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 0d65f5e280f..74dd1d562b3 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -26,7 +26,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } public void testAllFilesPresentInBox() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true, "ieee754/oldLanguageVersions", "operatorConventions/oldLanguageVersions"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -10751,7 +10751,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } public void testAllFilesPresentInIeee754() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true, "oldLanguageVersions"); } @TestMetadata("anyToReal.kt") @@ -10914,11 +10914,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); @@ -10929,31 +10924,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); @@ -10999,16 +10979,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/when.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10.kt"); - } - - @TestMetadata("when10_properIeeeComparisons.kt") - public void testWhen10_properIeeeComparisons() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - } - @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); @@ -11024,11 +10994,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - } - @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); @@ -16177,7 +16142,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } public void testAllFilesPresentInOperatorConventions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true, "oldLanguageVersions"); } @TestMetadata("annotatedAssignment.kt") @@ -16260,11 +16225,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } - @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") - public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { - runTest("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); - } - @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java index 8aad27c62f3..51260f6ec26 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java @@ -41,7 +41,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { } public void testAllFilesPresentInBytecodeText() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true, "ieee754/oldLanguageVersions"); } @TestMetadata("annotationDefaultValue.kt") @@ -2151,7 +2151,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { } public void testAllFilesPresentInIeee754() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true, "oldLanguageVersions"); } @TestMetadata("nullableDoubleEquals.kt") @@ -2159,80 +2159,40 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("smartCastsForDouble.kt") public void testSmartCastsForDouble() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble.kt"); } - @TestMetadata("smartCastsForDouble10.kt") - public void testSmartCastsForDouble10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt"); - } - @TestMetadata("smartCastsForFloat.kt") public void testSmartCastsForFloat() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat.kt"); } - @TestMetadata("smartCastsForFloat10.kt") - public void testSmartCastsForFloat10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt"); - } - @TestMetadata("when.kt") public void testWhen() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/when.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/when10.kt"); - } - @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { runTest("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast.kt"); } - - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt"); - } } @TestMetadata("compiler/testData/codegen/bytecodeText/inline") diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 1dea83c662e..e8aa3487123 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -361,7 +361,14 @@ fun main(args: Array) { } testClass { - model("codegen/box", targetBackend = TargetBackend.JVM_IR) + model( + "codegen/box", + targetBackend = TargetBackend.JVM_IR, + excludeDirs = listOf( + "ieee754/oldLanguageVersions", + "operatorConventions/oldLanguageVersions" + ) + ) } testClass { @@ -434,7 +441,13 @@ fun main(args: Array) { } testClass { - model("codegen/bytecodeText", targetBackend = TargetBackend.JVM_IR) + model( + "codegen/bytecodeText", + targetBackend = TargetBackend.JVM_IR, + excludeDirs = listOf( + "ieee754/oldLanguageVersions" + ) + ) } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 157ff61b43b..5d6bc3f7d77 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -9379,11 +9379,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); @@ -9394,31 +9389,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); @@ -9449,11 +9429,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); } - @TestMetadata("when10_properIeeeComparisons.kt") - public void testWhen10_properIeeeComparisons() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - } - @TestMetadata("whenNoSubject_properIeeeComparisons.kt") public void testWhenNoSubject_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); @@ -9464,15 +9439,48 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - } - @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } + + @TestMetadata("compiler/testData/codegen/box/ieee754/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + + @TestMetadata("nullableDoubleEquals10.kt") + public void testNullableDoubleEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt"); + } + + @TestMetadata("nullableDoubleNotEquals10.kt") + public void testNullableDoubleNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt"); + } + + @TestMetadata("nullableFloatEquals10.kt") + public void testNullableFloatEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatEquals10.kt"); + } + + @TestMetadata("nullableFloatNotEquals10.kt") + public void testNullableFloatNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt"); + } + + @TestMetadata("whenNullableSmartCast10.kt") + public void testWhenNullableSmartCast10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/increment") @@ -13447,6 +13455,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); + } + } } @TestMetadata("compiler/testData/codegen/box/optimizations") diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 7ea066e31d5..2ae0abe1a2e 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -10509,11 +10509,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } - @TestMetadata("nullableDoubleEquals10.kt") - public void testNullableDoubleEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - } - @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); @@ -10524,31 +10519,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } - @TestMetadata("nullableDoubleNotEquals10.kt") - public void testNullableDoubleNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - } - @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } - @TestMetadata("nullableFloatEquals10.kt") - public void testNullableFloatEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - } - @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } - @TestMetadata("nullableFloatNotEquals10.kt") - public void testNullableFloatNotEquals10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - } - @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); @@ -10594,16 +10574,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/when.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10.kt"); - } - - @TestMetadata("when10_properIeeeComparisons.kt") - public void testWhen10_properIeeeComparisons() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - } - @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); @@ -10619,15 +10589,53 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } - @TestMetadata("whenNullableSmartCast10.kt") - public void testWhenNullableSmartCast10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - } - @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } + + @TestMetadata("compiler/testData/codegen/box/ieee754/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + + @TestMetadata("nullableDoubleEquals10.kt") + public void testNullableDoubleEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleEquals10.kt"); + } + + @TestMetadata("nullableDoubleNotEquals10.kt") + public void testNullableDoubleNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableDoubleNotEquals10.kt"); + } + + @TestMetadata("nullableFloatEquals10.kt") + public void testNullableFloatEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatEquals10.kt"); + } + + @TestMetadata("nullableFloatNotEquals10.kt") + public void testNullableFloatNotEquals10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/nullableFloatNotEquals10.kt"); + } + + @TestMetadata("when10.kt") + public void testWhen10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/when10.kt"); + } + + @TestMetadata("whenNullableSmartCast10.kt") + public void testWhenNullableSmartCast10() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/oldLanguageVersions/whenNullableSmartCast10.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/increment") @@ -14602,6 +14610,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } + + @TestMetadata("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OldLanguageVersions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInOldLanguageVersions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); + } + } } @TestMetadata("compiler/testData/codegen/box/optimizations")