diff --git a/compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt b/compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt deleted file mode 100644 index 3caf46830a9..00000000000 --- a/compiler/testData/codegen/bytecodeText/ranges/ifNotInCollection.kt +++ /dev/null @@ -1,16 +0,0 @@ -// WITH_RUNTIME - -// FILE: Ints.kt -val ints = listOf(1, 2, 3) - -// FILE: Test.kt -fun test1(i: Int) = - if (i in ints) "Yes" else "No" - -fun test2(i: Int) = - if (i !in ints) "Yes" else "No" - -// @TestKt.class: -// 0 ICONST_0 -// 0 ICONST_1 -// 0 IXOR diff --git a/compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt b/compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt new file mode 100644 index 00000000000..781ff728cae --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt @@ -0,0 +1,16 @@ +fun testInt(x: Int, a: Int, b: Int) = + if (x !in a .. b) "no" else "yes" + +fun testLong(x: Long, a: Long, b: Long) = + if (x !in a .. b) "no" else "yes" + +fun testDouble(x: Double, a: Double, b: Double) = + if (x !in a .. b) "no" else "yes" + +fun testString(x: String, a: String, b: String) = + if (x !in a .. b) "no" else "yes" + +fun testCollection(x: Any, xs: List) = + if (x !in xs) "no" else "yes" + +// 0 IXOR diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index e42ccd675f5..4a0d04a7e47 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -1853,9 +1853,9 @@ 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"); + @TestMetadata("ifNotInRange.kt") + public void testIfNotInRange() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt"); doTest(fileName); }