Reorganize codegen tests for old language versions

Put all files under a single "oldLanguageVersions" directory under test
data of each test
This commit is contained in:
Alexander Udalov
2019-10-28 11:38:11 +01:00
parent dcd72b06d8
commit c3729c8189
23 changed files with 354 additions and 302 deletions
@@ -12173,49 +12173,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
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")
@@ -17351,6 +17308,80 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/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/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/ieee754")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Ieee754 extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInIeee754() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("nullableDoubleEquals10.kt")
public void testNullableDoubleEquals10() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/nullableDoubleEquals10.kt");
}
@TestMetadata("nullableDoubleNotEquals10.kt")
public void testNullableDoubleNotEquals10() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/nullableDoubleNotEquals10.kt");
}
@TestMetadata("nullableFloatEquals10.kt")
public void testNullableFloatEquals10() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/nullableFloatEquals10.kt");
}
@TestMetadata("nullableFloatNotEquals10.kt")
public void testNullableFloatNotEquals10() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/nullableFloatNotEquals10.kt");
}
@TestMetadata("when10.kt")
public void testWhen10() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/when10.kt");
}
@TestMetadata("whenNullableSmartCast10.kt")
public void testWhenNullableSmartCast10() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/whenNullableSmartCast10.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/operatorConventions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class OperatorConventions extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInOperatorConventions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("percentAsModOnBigIntegerWithoutRem.kt")
public void testPercentAsModOnBigIntegerWithoutRem() throws Exception {
runTest("compiler/testData/codegen/box/oldLanguageVersions/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/operatorConventions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -17520,24 +17551,6 @@ 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")