ForLoopsLowering: Add additional bytecode text tests for optimization of

unsigned progressions.
This commit is contained in:
Mark Punzalan
2020-04-07 22:52:17 -07:00
committed by Alexander Udalov
parent 0e6af517d7
commit f249e7f5e9
22 changed files with 713 additions and 15 deletions
@@ -1931,11 +1931,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInObjectArray.kt");
}
@TestMetadata("forInOptimizableUnsignedRange.kt")
public void testForInOptimizableUnsignedRange() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInOptimizableUnsignedRange.kt");
}
@TestMetadata("forInPrimitiveArray.kt")
public void testForInPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInPrimitiveArray.kt");
@@ -2477,6 +2472,64 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/unsigned")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Unsigned extends AbstractBytecodeTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInUnsigned() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("forInDownToUIntMinValue.kt")
public void testForInDownToUIntMinValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInDownToUIntMinValue.kt");
}
@TestMetadata("forInDownToULongMinValue.kt")
public void testForInDownToULongMinValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInDownToULongMinValue.kt");
}
@TestMetadata("forInOptimizableUnsignedRange.kt")
public void testForInOptimizableUnsignedRange() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInOptimizableUnsignedRange.kt");
}
@TestMetadata("forInRangeToUIntMaxValue.kt")
public void testForInRangeToUIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInRangeToUIntMaxValue.kt");
}
@TestMetadata("forInRangeToULongMaxValue.kt")
public void testForInRangeToULongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInRangeToULongMaxValue.kt");
}
@TestMetadata("forInUntilUIntMaxValue.kt")
public void testForInUntilUIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInUntilUIntMaxValue.kt");
}
@TestMetadata("forInUntilUIntMinValue.kt")
public void testForInUntilUIntMinValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInUntilUIntMinValue.kt");
}
@TestMetadata("forInUntilULongMaxValue.kt")
public void testForInUntilULongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInUntilULongMaxValue.kt");
}
@TestMetadata("forInUntilULongMinValue.kt")
public void testForInUntilULongMinValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/unsigned/forInUntilULongMinValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/hashCode")