Add blackbox test for KT-42533.

This commit is contained in:
Mark Punzalan
2020-10-07 23:40:18 +00:00
committed by Alexander Udalov
parent 375d92cf67
commit a093efde11
8 changed files with 58 additions and 10 deletions
@@ -22466,6 +22466,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
public void testForIntInIntUntilSmartcastInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt");
}
@TestMetadata("kt42533.kt")
public void testKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow")
@@ -0,0 +1,23 @@
// IGNORE_BACKEND: JVM
// WITH_RUNTIME
// KJS_WITH_FULL_RUNTIME
fun box(): String {
// These should all be empty progressions
for (i in (Int.MAX_VALUE - 2) until Int.MIN_VALUE) { return "Fail: Int" }
for (i in ((Int.MAX_VALUE - 2) until Int.MIN_VALUE).reversed()) { return "Fail: Int reversed" }
for (i in (Long.MAX_VALUE - 2) until Long.MIN_VALUE) { return "Fail: Long" }
for (i in ((Long.MAX_VALUE - 2) until Long.MIN_VALUE).reversed()) { return "Fail: Long reversed" }
for (i in (Char.MAX_VALUE - 2) until Char.MIN_VALUE) { return "Fail: Char" }
for (i in ((Char.MAX_VALUE - 2) until Char.MIN_VALUE).reversed()) { return "Fail: Char reversed" }
for (i in (UInt.MAX_VALUE - 2u) until UInt.MIN_VALUE) { return "Fail: UInt" }
for (i in ((UInt.MAX_VALUE - 2u) until UInt.MIN_VALUE).reversed()) { return "Fail: UInt reversed" }
for (i in (ULong.MAX_VALUE - 2u) until ULong.MIN_VALUE) { return "Fail: ULong" }
for (i in ((ULong.MAX_VALUE - 2u) until ULong.MIN_VALUE).reversed()) { return "Fail: ULong reversed" }
return "OK"
}
@@ -24232,6 +24232,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testForIntInIntUntilSmartcastInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt");
}
@TestMetadata("kt42533.kt")
public void testKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow")
@@ -24155,6 +24155,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ForInUntil extends AbstractLightAnalysisModeTest {
@TestMetadata("kt42533.kt")
public void ignoreKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -22466,6 +22466,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
public void testForIntInIntUntilSmartcastInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt");
}
@TestMetadata("kt42533.kt")
public void testKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow")
@@ -18807,6 +18807,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
public void testForIntInIntUntilSmartcastInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt");
}
@TestMetadata("kt42533.kt")
public void testKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow")
@@ -16913,16 +16913,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt");
}
@TestMetadata("primitiveEqObjectInt.kt")
public void testPrimitiveEqObjectInt() throws Exception {
runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt");
}
@TestMetadata("primitiveEqObjectLong.kt")
public void testPrimitiveEqObjectLong() throws Exception {
runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt");
}
@TestMetadata("primitiveEqObjectShort.kt")
public void testPrimitiveEqObjectShort() throws Exception {
runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt");
@@ -18807,6 +18797,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
public void testForIntInIntUntilSmartcastInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt");
}
@TestMetadata("kt42533.kt")
public void testKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow")
@@ -18912,6 +18912,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
public void testForIntInIntUntilSmartcastInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt");
}
@TestMetadata("kt42533.kt")
public void testKt42533() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/kt42533.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow")