JVM_IR KT-48432 fix overflow in const-bound range optimization
This commit is contained in:
committed by
TeamCityServer
parent
ce44403d1b
commit
c2b575505a
+54
@@ -30273,6 +30273,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
@@ -30489,6 +30495,24 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmStaticContainsInObject.kt")
|
||||
public void testJvmStaticContainsInObject() throws Exception {
|
||||
@@ -30501,6 +30525,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
@@ -30519,6 +30549,30 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
|
||||
+35
-14
@@ -8,10 +8,6 @@ package org.jetbrains.kotlin.backend.common.lower.loops.handlers
|
||||
import org.jetbrains.kotlin.backend.common.CommonBackendContext
|
||||
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
|
||||
import org.jetbrains.kotlin.backend.common.lower.loops.*
|
||||
import org.jetbrains.kotlin.backend.common.lower.loops.ProgressionDirection
|
||||
import org.jetbrains.kotlin.backend.common.lower.loops.ProgressionHandler
|
||||
import org.jetbrains.kotlin.backend.common.lower.loops.ProgressionHeaderInfo
|
||||
import org.jetbrains.kotlin.backend.common.lower.loops.ProgressionType
|
||||
import org.jetbrains.kotlin.backend.common.lower.matchers.SimpleCalleeMatcher
|
||||
import org.jetbrains.kotlin.ir.builders.irInt
|
||||
import org.jetbrains.kotlin.ir.expressions.IrCall
|
||||
@@ -80,16 +76,41 @@ internal class RangeToHandler(private val context: CommonBackendContext) :
|
||||
private fun IrExpression.convertToExclusiveUpperBound(): IrConstImpl<out Any>? {
|
||||
val irConst = this as? IrConst<*> ?: return null
|
||||
return when (irConst.kind) {
|
||||
IrConstKind.Char ->
|
||||
IrConstImpl.char(startOffset, endOffset, type, IrConstKind.Char.valueOf(irConst).inc())
|
||||
IrConstKind.Byte ->
|
||||
IrConstImpl.byte(startOffset, endOffset, type, IrConstKind.Byte.valueOf(irConst).inc())
|
||||
IrConstKind.Short ->
|
||||
IrConstImpl.short(startOffset, endOffset, type, IrConstKind.Short.valueOf(irConst).inc())
|
||||
IrConstKind.Int ->
|
||||
IrConstImpl.int(startOffset, endOffset, type, IrConstKind.Int.valueOf(irConst).inc())
|
||||
IrConstKind.Long ->
|
||||
IrConstImpl.long(startOffset, endOffset, type, IrConstKind.Long.valueOf(irConst).inc())
|
||||
IrConstKind.Char -> {
|
||||
val charValue = IrConstKind.Char.valueOf(irConst)
|
||||
if (charValue != Char.MAX_VALUE)
|
||||
IrConstImpl.char(startOffset, endOffset, type, charValue.inc())
|
||||
else
|
||||
null
|
||||
}
|
||||
IrConstKind.Byte -> {
|
||||
val byteValue = IrConstKind.Byte.valueOf(irConst)
|
||||
if (byteValue != Byte.MAX_VALUE)
|
||||
IrConstImpl.byte(startOffset, endOffset, type, byteValue.inc())
|
||||
else
|
||||
null
|
||||
}
|
||||
IrConstKind.Short -> {
|
||||
val shortValue = IrConstKind.Short.valueOf(irConst)
|
||||
if (shortValue != Short.MAX_VALUE)
|
||||
IrConstImpl.short(startOffset, endOffset, type, shortValue.inc())
|
||||
else
|
||||
null
|
||||
}
|
||||
IrConstKind.Int -> {
|
||||
val intValue = IrConstKind.Int.valueOf(irConst)
|
||||
if (intValue != Int.MAX_VALUE)
|
||||
IrConstImpl.int(startOffset, endOffset, type, intValue.inc())
|
||||
else
|
||||
null
|
||||
}
|
||||
IrConstKind.Long -> {
|
||||
val longValue = IrConstKind.Long.valueOf(irConst)
|
||||
if (longValue != Long.MAX_VALUE)
|
||||
IrConstImpl.long(startOffset, endOffset, type, longValue.inc())
|
||||
else
|
||||
null
|
||||
}
|
||||
else ->
|
||||
null
|
||||
}
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
val x1 = 1.toChar()
|
||||
if (x1 !in Char.MIN_VALUE..Char.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
val x1 = 1
|
||||
if (x1 !in Byte.MIN_VALUE..Byte.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
val x1 = 1
|
||||
if (x1 !in Int.MIN_VALUE..Int.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
val x1 = 1
|
||||
if (x1 !in Short.MIN_VALUE..Short.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
val x1 = 1L
|
||||
if (x1 !in Long.MIN_VALUE..Long.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val x1 = 1U
|
||||
if (x1 !in UByte.MIN_VALUE..UByte.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val x1 = 1U
|
||||
if (x1 !in UInt.MIN_VALUE..UInt.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val x1 = 1U
|
||||
if (x1 !in UShort.MIN_VALUE..UShort.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val x1 = 1UL
|
||||
if (x1 !in ULong.MIN_VALUE..ULong.MAX_VALUE)
|
||||
return "Failed"
|
||||
return "OK"
|
||||
}
|
||||
+54
@@ -30117,6 +30117,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
@@ -30333,6 +30339,24 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmStaticContainsInObject.kt")
|
||||
public void testJvmStaticContainsInObject() throws Exception {
|
||||
@@ -30345,6 +30369,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
@@ -30363,6 +30393,30 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
|
||||
+54
@@ -30273,6 +30273,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
@@ -30489,6 +30495,24 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmStaticContainsInObject.kt")
|
||||
public void testJvmStaticContainsInObject() throws Exception {
|
||||
@@ -30501,6 +30525,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
@@ -30519,6 +30549,30 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
|
||||
+45
@@ -25628,6 +25628,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt");
|
||||
@@ -25808,6 +25813,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmStaticContainsInObject.kt")
|
||||
public void testJvmStaticContainsInObject() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/jvmStaticContainsInObject.kt");
|
||||
@@ -25818,6 +25838,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt");
|
||||
@@ -25828,6 +25853,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/userDefinedContainsExtension.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+45
@@ -20267,6 +20267,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt");
|
||||
@@ -20447,11 +20452,31 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt20106.kt")
|
||||
public void testKt20106() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt");
|
||||
@@ -20467,6 +20492,26 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/userDefinedContainsExtension.kt");
|
||||
|
||||
Generated
+45
@@ -19673,6 +19673,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt");
|
||||
@@ -19853,11 +19858,31 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt20106.kt")
|
||||
public void testKt20106() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt");
|
||||
@@ -19873,6 +19898,26 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/userDefinedContainsExtension.kt");
|
||||
|
||||
Generated
+45
@@ -19723,6 +19723,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt");
|
||||
@@ -19903,11 +19908,31 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt20106.kt")
|
||||
public void testKt20106() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt");
|
||||
@@ -19923,6 +19948,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/userDefinedContainsExtension.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+45
@@ -12654,6 +12654,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("charInCharRangeWithPossibleOverflow.kt")
|
||||
public void testCharInCharRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/charInCharRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithRangeBoundEliminated.kt")
|
||||
public void testComparisonWithRangeBoundEliminated() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt");
|
||||
@@ -12724,6 +12729,26 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInByteRangeWithPossibleOverflow.kt")
|
||||
public void testIntInByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInIntRangeWithPossibleOverflow.kt")
|
||||
public void testIntInIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intInShortRangeWithPossibleOverflow.kt")
|
||||
public void testIntInShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/intInShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("longInLongRangeWithPossibleOverflow.kt")
|
||||
public void testLongInLongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/longInLongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullableInPrimitiveRange.kt")
|
||||
public void testNullableInPrimitiveRange() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt");
|
||||
@@ -12739,6 +12764,26 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/smartCastOnBothEnds.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUByteRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUByteRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUByteRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUIntRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUIntRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUIntRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uintInUShortRangeWithPossibleOverflow.kt")
|
||||
public void testUintInUShortRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/uintInUShortRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ulongInULongRangeWithPossibleOverflow.kt")
|
||||
public void testUlongInULongRangeWithPossibleOverflow() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/ulongInULongRangeWithPossibleOverflow.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("userDefinedContainsExtension.kt")
|
||||
public void testUserDefinedContainsExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ranges/contains/userDefinedContainsExtension.kt");
|
||||
|
||||
Reference in New Issue
Block a user