Add blackbox test for KT-42533.
This commit is contained in:
committed by
Alexander Udalov
parent
375d92cf67
commit
a093efde11
Generated
+5
@@ -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"
|
||||
}
|
||||
+5
@@ -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")
|
||||
|
||||
+5
@@ -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);
|
||||
}
|
||||
|
||||
+5
@@ -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")
|
||||
|
||||
Generated
+5
@@ -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")
|
||||
|
||||
Generated
+5
-10
@@ -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")
|
||||
|
||||
+5
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user