Add failing tests for overflow in empty progressions KT-24204

This commit is contained in:
Ilya Gorbunov
2018-07-09 03:43:47 +03:00
parent 14b8ff7d71
commit be8cb94105
12 changed files with 304 additions and 2 deletions
@@ -15820,6 +15820,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ranges/expression/openRange.kt");
}
@TestMetadata("overflowZeroDownToMaxValue.kt")
public void testOverflowZeroDownToMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/expression/overflowZeroDownToMaxValue.kt");
}
@TestMetadata("overflowZeroToMinValue.kt")
public void testOverflowZeroToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/expression/overflowZeroToMinValue.kt");
}
@TestMetadata("progressionDownToMinValue.kt")
public void testProgressionDownToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt");
@@ -16351,6 +16361,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ranges/literal/openRange.kt");
}
@TestMetadata("overflowZeroDownToMaxValue.kt")
public void testOverflowZeroDownToMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/literal/overflowZeroDownToMaxValue.kt");
}
@TestMetadata("overflowZeroToMinValue.kt")
public void testOverflowZeroToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/literal/overflowZeroToMinValue.kt");
}
@TestMetadata("progressionDownToMinValue.kt")
public void testProgressionDownToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt");
@@ -15820,6 +15820,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/ranges/expression/openRange.kt");
}
@TestMetadata("overflowZeroDownToMaxValue.kt")
public void testOverflowZeroDownToMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/expression/overflowZeroDownToMaxValue.kt");
}
@TestMetadata("overflowZeroToMinValue.kt")
public void testOverflowZeroToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/expression/overflowZeroToMinValue.kt");
}
@TestMetadata("progressionDownToMinValue.kt")
public void testProgressionDownToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt");
@@ -16351,6 +16361,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/ranges/literal/openRange.kt");
}
@TestMetadata("overflowZeroDownToMaxValue.kt")
public void testOverflowZeroDownToMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/literal/overflowZeroDownToMaxValue.kt");
}
@TestMetadata("overflowZeroToMinValue.kt")
public void testOverflowZeroToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/literal/overflowZeroToMinValue.kt");
}
@TestMetadata("progressionDownToMinValue.kt")
public void testProgressionDownToMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt");
@@ -106,6 +106,7 @@ public class GenerateRangesCodegenTestData {
private static final List<String> INTEGER_PRIMITIVES = Arrays.asList("Integer", "Byte", "Short", "Long", "Character");
// TODO: Use common MIN_VALUE/MAX_VALUE constants and remove these exclusions
private static final List<String> IGNORED_FOR_JS_BACKEND = Arrays.asList(
"inexactDownToMinValue.kt",
"inexactToMaxValue.kt",
@@ -116,7 +117,10 @@ public class GenerateRangesCodegenTestData {
"progressionMaxValueMinusTwoToMaxValue.kt",
"progressionMaxValueToMaxValue.kt",
"progressionMaxValueToMinValue.kt",
"progressionMinValueToMinValue.kt");
"progressionMinValueToMinValue.kt",
"overflowZeroToMinValue.kt",
"overflowZeroDownToMaxValue.kt"
);
private static final List<String> IGNORED_FOR_NATIVE_BACKEND = Arrays.asList(
"inexactDownToMinValue.kt",
@@ -128,7 +132,9 @@ public class GenerateRangesCodegenTestData {
"progressionMaxValueMinusTwoToMaxValue.kt",
"progressionMaxValueToMaxValue.kt",
"progressionMaxValueToMinValue.kt",
"progressionMinValueToMinValue.kt"
"progressionMinValueToMinValue.kt",
"overflowZeroToMinValue.kt",
"overflowZeroDownToMaxValue.kt"
);
private static void writeIgnoreBackendDirective(PrintWriter out, String backendName) {