Provide intrinsic generators for in/!in expression

TODO some tests should fail because range of comparables
(e.g., '"Alpha" .. "Omega"') is currently not implemented
This commit is contained in:
Dmitry Petrov
2017-06-29 18:09:38 +03:00
parent e3320c53f5
commit a7071ae7af
24 changed files with 744 additions and 29 deletions
@@ -13177,6 +13177,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("inArray.kt")
public void testInArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inArray.kt");
doTest(fileName);
}
@TestMetadata("inCharSequence.kt")
public void testInCharSequence() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt");
doTest(fileName);
}
@TestMetadata("inComparableRange.kt")
public void testInComparableRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt");
@@ -13195,6 +13207,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("inIterable.kt")
public void testInIterable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIterable.kt");
doTest(fileName);
}
@TestMetadata("inOptimizableDoubleRange.kt")
public void testInOptimizableDoubleRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt");
@@ -13219,6 +13237,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("inPrimitiveProgression.kt")
public void testInPrimitiveProgression() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt");
doTest(fileName);
}
@TestMetadata("inPrimitiveRange.kt")
public void testInPrimitiveRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt");
doTest(fileName);
}
@TestMetadata("inRangeWithCustomContains.kt")
public void testInRangeWithCustomContains() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt");
@@ -1853,6 +1853,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("ifNotInCollection.kt")
public void testIfNotInCollection() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt");
doTest(fileName);
}
@TestMetadata("inNonMatchingRange.kt")
public void testInNonMatchingRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inNonMatchingRange.kt");
@@ -13177,6 +13177,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("inArray.kt")
public void testInArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inArray.kt");
doTest(fileName);
}
@TestMetadata("inCharSequence.kt")
public void testInCharSequence() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt");
doTest(fileName);
}
@TestMetadata("inComparableRange.kt")
public void testInComparableRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt");
@@ -13195,6 +13207,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
doTest(fileName);
}
@TestMetadata("inIterable.kt")
public void testInIterable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIterable.kt");
doTest(fileName);
}
@TestMetadata("inOptimizableDoubleRange.kt")
public void testInOptimizableDoubleRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt");
@@ -13219,6 +13237,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
doTest(fileName);
}
@TestMetadata("inPrimitiveProgression.kt")
public void testInPrimitiveProgression() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt");
doTest(fileName);
}
@TestMetadata("inPrimitiveRange.kt")
public void testInPrimitiveRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt");
doTest(fileName);
}
@TestMetadata("inRangeWithCustomContains.kt")
public void testInRangeWithCustomContains() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt");