Move codegen tests on old language versions under oldLanguageVersions/

This directory is skipped in JVM IR test generator, so they won't show
up as failed anymore.

Note that only failing tests are moved to oldLanguageVersions/. Tests
which already pass are still being run. It may be useful not to break
them in case we _do_ need to support some pre-1.3 language feature
switches in JVM IR.
This commit is contained in:
Alexander Udalov
2019-10-28 18:00:47 +01:00
parent c3729c8189
commit 1978db9d0e
33 changed files with 942 additions and 418 deletions
@@ -94,11 +94,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/constClosureOptimization.kt");
}
@TestMetadata("constCoroutine.kt")
public void testConstCoroutine() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/constCoroutine.kt");
}
@TestMetadata("defaultMethodBody.kt")
public void testDefaultMethodBody() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/defaultMethodBody.kt");
@@ -264,11 +259,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/noFlagAnnotations.kt");
}
@TestMetadata("noInlineJavaProtectedConstants.kt")
public void testNoInlineJavaProtectedConstants() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt");
}
@TestMetadata("noNumberCheckCast.kt")
public void testNoNumberCheckCast() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/noNumberCheckCast.kt");
@@ -1093,11 +1083,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@TestMetadata("accessorsForPrivateConstants.kt")
public void testAccessorsForPrivateConstants() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt");
}
public void testAllFilesPresentInConstProperty() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@@ -1273,11 +1258,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("crossinlineSuspendContinuation_1_2.kt")
public void testCrossinlineSuspendContinuation_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/crossinlineSuspendContinuation_1_2.kt");
}
@TestMetadata("crossinlineSuspendContinuation_1_3.kt")
public void testCrossinlineSuspendContinuation_1_3() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/crossinlineSuspendContinuation_1_3.kt");
@@ -1288,11 +1268,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt");
}
@TestMetadata("doNotReassignContinuation_1_2.kt")
public void testDoNotReassignContinuation_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation_1_2.kt");
}
@TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines.experimental");
@@ -1318,16 +1293,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt");
}
@TestMetadata("varValueConflictsWithTableSameSort_1_2.kt")
public void testVarValueConflictsWithTableSameSort_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort_1_2.kt");
}
@TestMetadata("varValueConflictsWithTable_1_2.kt")
public void testVarValueConflictsWithTable_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable_1_2.kt");
}
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/debug")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -3415,6 +3380,67 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("constCoroutine.kt")
public void testConstCoroutine() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/constCoroutine.kt");
}
@TestMetadata("noInlineJavaProtectedConstants.kt")
public void testNoInlineJavaProtectedConstants() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/noInlineJavaProtectedConstants.kt");
}
@TestMetadata("compiler/testData/codegen/bytecodeText/oldLanguageVersions/constProperty")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ConstProperty extends AbstractBytecodeTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@TestMetadata("accessorsForPrivateConstants.kt")
public void testAccessorsForPrivateConstants() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/constProperty/accessorsForPrivateConstants.kt");
}
public void testAllFilesPresentInConstProperty() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/oldLanguageVersions/constProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/oldLanguageVersions/coroutines")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Coroutines extends AbstractBytecodeTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/oldLanguageVersions/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("crossinlineSuspendContinuation_1_2.kt")
public void testCrossinlineSuspendContinuation_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/coroutines/crossinlineSuspendContinuation_1_2.kt");
}
@TestMetadata("doNotReassignContinuation_1_2.kt")
public void testDoNotReassignContinuation_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/coroutines/doNotReassignContinuation_1_2.kt");
}
@TestMetadata("varValueConflictsWithTableSameSort_1_2.kt")
public void testVarValueConflictsWithTableSameSort_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/coroutines/varValueConflictsWithTableSameSort_1_2.kt");
}
@TestMetadata("varValueConflictsWithTable_1_2.kt")
public void testVarValueConflictsWithTable_1_2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/oldLanguageVersions/coroutines/varValueConflictsWithTable_1_2.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/oldLanguageVersions/ieee754")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)