Move coroutines to kotlin.coroutines package: tests

Introduce COMMON_COROUTINES_TEST directive.
Every test with this directive is run twice: one time with
language version 1.2 and kotlin.coroutines.experimental package
and the other time with language version 1.3 and kotlin.coroutines
package. Each run is a separate method: with suffixes _1_2 and _1_3
respectively.
However, since codegen of release coroutines is not supported in JS
backend, we generate only one method: with suffix _1_2.
 #KT-23362
This commit is contained in:
Ilmir Usmanov
2018-04-19 17:10:47 +03:00
parent 30ab1e2b35
commit f60787d57c
340 changed files with 9150 additions and 3046 deletions
@@ -1034,23 +1034,51 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
@TestMetadata("doNotReassignContinuation.kt")
public void testDoNotReassignContinuation() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt");
public void testDoNotReassignContinuation_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("doNotReassignContinuation.kt")
public void testDoNotReassignContinuation_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt");
public void testReturnUnitInLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("varValueConflictsWithTable.kt")
public void testVarValueConflictsWithTable() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt");
@TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("varValueConflictsWithTableSameSort.kt")
public void testVarValueConflictsWithTableSameSort() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt");
public void testVarValueConflictsWithTableSameSort_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("varValueConflictsWithTableSameSort.kt")
public void testVarValueConflictsWithTableSameSort_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("varValueConflictsWithTable.kt")
public void testVarValueConflictsWithTable_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("varValueConflictsWithTable.kt")
public void testVarValueConflictsWithTable_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling")
@@ -1066,53 +1094,123 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
@TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt");
public void testComplicatedMerge_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("i2bResult.kt")
public void testI2bResult() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt");
public void testI2bResult_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("i2bResult.kt")
public void testI2bResult_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt");
public void testLoadFromBooleanArray_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt");
public void testLoadFromByteArray_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt");
public void testNoVariableInTable_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
public void testSameIconst1ManyVars_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
public void testUsedInArrayStore_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt");
public void testUsedInMethodCall_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt");
public void testUsedInPutfield_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
@TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt");
public void testUsedInVarStore_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
}
@TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
}
}
}