[Backend] Reorganize version 1.0 codegen tests

- Extract all backend codegen tests that specifically target behaviour
  in to-be-deprecated functionality from language versions < 1.3"
- Remove those tests from the JVM IR test suite.
This commit is contained in:
Kristoffer Andersen
2019-10-18 12:21:47 +02:00
committed by Alexander Udalov
parent 38ea5a85a3
commit 8af3b3e51e
24 changed files with 300 additions and 313 deletions
@@ -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")
@@ -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")