Generate test data for in-expression tests, fix bug with indices

This commit is contained in:
Dmitry Petrov
2017-07-12 11:56:03 +03:00
parent 890c6a9983
commit 6a673a03e4
25 changed files with 11651 additions and 128 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,159 @@
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
val range0 = '3' downTo '1'
val range1 = '1' downTo '3'
val element0 = '0'
val element1 = '1'
val element2 = '2'
val element3 = '3'
val element4 = '4'
fun box(): String {
testR0xE0()
testR0xE1()
testR0xE2()
testR0xE3()
testR0xE4()
testR1xE0()
testR1xE1()
testR1xE2()
testR1xE3()
testR1xE4()
return "OK"
}
fun testR0xE0() {
// with possible local optimizations
if ('0' in '3' downTo '1' != range0.contains('0')) throw AssertionError()
if ('0' !in '3' downTo '1' != !range0.contains('0')) throw AssertionError()
if (!('0' in '3' downTo '1') != !range0.contains('0')) throw AssertionError()
if (!('0' !in '3' downTo '1') != range0.contains('0')) throw AssertionError()
// no local optimizations
if (element0 in '3' downTo '1' != range0.contains(element0)) throw AssertionError()
if (element0 !in '3' downTo '1' != !range0.contains(element0)) throw AssertionError()
if (!(element0 in '3' downTo '1') != !range0.contains(element0)) throw AssertionError()
if (!(element0 !in '3' downTo '1') != range0.contains(element0)) throw AssertionError()
}
fun testR0xE1() {
// with possible local optimizations
if ('1' in '3' downTo '1' != range0.contains('1')) throw AssertionError()
if ('1' !in '3' downTo '1' != !range0.contains('1')) throw AssertionError()
if (!('1' in '3' downTo '1') != !range0.contains('1')) throw AssertionError()
if (!('1' !in '3' downTo '1') != range0.contains('1')) throw AssertionError()
// no local optimizations
if (element1 in '3' downTo '1' != range0.contains(element1)) throw AssertionError()
if (element1 !in '3' downTo '1' != !range0.contains(element1)) throw AssertionError()
if (!(element1 in '3' downTo '1') != !range0.contains(element1)) throw AssertionError()
if (!(element1 !in '3' downTo '1') != range0.contains(element1)) throw AssertionError()
}
fun testR0xE2() {
// with possible local optimizations
if ('2' in '3' downTo '1' != range0.contains('2')) throw AssertionError()
if ('2' !in '3' downTo '1' != !range0.contains('2')) throw AssertionError()
if (!('2' in '3' downTo '1') != !range0.contains('2')) throw AssertionError()
if (!('2' !in '3' downTo '1') != range0.contains('2')) throw AssertionError()
// no local optimizations
if (element2 in '3' downTo '1' != range0.contains(element2)) throw AssertionError()
if (element2 !in '3' downTo '1' != !range0.contains(element2)) throw AssertionError()
if (!(element2 in '3' downTo '1') != !range0.contains(element2)) throw AssertionError()
if (!(element2 !in '3' downTo '1') != range0.contains(element2)) throw AssertionError()
}
fun testR0xE3() {
// with possible local optimizations
if ('3' in '3' downTo '1' != range0.contains('3')) throw AssertionError()
if ('3' !in '3' downTo '1' != !range0.contains('3')) throw AssertionError()
if (!('3' in '3' downTo '1') != !range0.contains('3')) throw AssertionError()
if (!('3' !in '3' downTo '1') != range0.contains('3')) throw AssertionError()
// no local optimizations
if (element3 in '3' downTo '1' != range0.contains(element3)) throw AssertionError()
if (element3 !in '3' downTo '1' != !range0.contains(element3)) throw AssertionError()
if (!(element3 in '3' downTo '1') != !range0.contains(element3)) throw AssertionError()
if (!(element3 !in '3' downTo '1') != range0.contains(element3)) throw AssertionError()
}
fun testR0xE4() {
// with possible local optimizations
if ('4' in '3' downTo '1' != range0.contains('4')) throw AssertionError()
if ('4' !in '3' downTo '1' != !range0.contains('4')) throw AssertionError()
if (!('4' in '3' downTo '1') != !range0.contains('4')) throw AssertionError()
if (!('4' !in '3' downTo '1') != range0.contains('4')) throw AssertionError()
// no local optimizations
if (element4 in '3' downTo '1' != range0.contains(element4)) throw AssertionError()
if (element4 !in '3' downTo '1' != !range0.contains(element4)) throw AssertionError()
if (!(element4 in '3' downTo '1') != !range0.contains(element4)) throw AssertionError()
if (!(element4 !in '3' downTo '1') != range0.contains(element4)) throw AssertionError()
}
fun testR1xE0() {
// with possible local optimizations
if ('0' in '1' downTo '3' != range1.contains('0')) throw AssertionError()
if ('0' !in '1' downTo '3' != !range1.contains('0')) throw AssertionError()
if (!('0' in '1' downTo '3') != !range1.contains('0')) throw AssertionError()
if (!('0' !in '1' downTo '3') != range1.contains('0')) throw AssertionError()
// no local optimizations
if (element0 in '1' downTo '3' != range1.contains(element0)) throw AssertionError()
if (element0 !in '1' downTo '3' != !range1.contains(element0)) throw AssertionError()
if (!(element0 in '1' downTo '3') != !range1.contains(element0)) throw AssertionError()
if (!(element0 !in '1' downTo '3') != range1.contains(element0)) throw AssertionError()
}
fun testR1xE1() {
// with possible local optimizations
if ('1' in '1' downTo '3' != range1.contains('1')) throw AssertionError()
if ('1' !in '1' downTo '3' != !range1.contains('1')) throw AssertionError()
if (!('1' in '1' downTo '3') != !range1.contains('1')) throw AssertionError()
if (!('1' !in '1' downTo '3') != range1.contains('1')) throw AssertionError()
// no local optimizations
if (element1 in '1' downTo '3' != range1.contains(element1)) throw AssertionError()
if (element1 !in '1' downTo '3' != !range1.contains(element1)) throw AssertionError()
if (!(element1 in '1' downTo '3') != !range1.contains(element1)) throw AssertionError()
if (!(element1 !in '1' downTo '3') != range1.contains(element1)) throw AssertionError()
}
fun testR1xE2() {
// with possible local optimizations
if ('2' in '1' downTo '3' != range1.contains('2')) throw AssertionError()
if ('2' !in '1' downTo '3' != !range1.contains('2')) throw AssertionError()
if (!('2' in '1' downTo '3') != !range1.contains('2')) throw AssertionError()
if (!('2' !in '1' downTo '3') != range1.contains('2')) throw AssertionError()
// no local optimizations
if (element2 in '1' downTo '3' != range1.contains(element2)) throw AssertionError()
if (element2 !in '1' downTo '3' != !range1.contains(element2)) throw AssertionError()
if (!(element2 in '1' downTo '3') != !range1.contains(element2)) throw AssertionError()
if (!(element2 !in '1' downTo '3') != range1.contains(element2)) throw AssertionError()
}
fun testR1xE3() {
// with possible local optimizations
if ('3' in '1' downTo '3' != range1.contains('3')) throw AssertionError()
if ('3' !in '1' downTo '3' != !range1.contains('3')) throw AssertionError()
if (!('3' in '1' downTo '3') != !range1.contains('3')) throw AssertionError()
if (!('3' !in '1' downTo '3') != range1.contains('3')) throw AssertionError()
// no local optimizations
if (element3 in '1' downTo '3' != range1.contains(element3)) throw AssertionError()
if (element3 !in '1' downTo '3' != !range1.contains(element3)) throw AssertionError()
if (!(element3 in '1' downTo '3') != !range1.contains(element3)) throw AssertionError()
if (!(element3 !in '1' downTo '3') != range1.contains(element3)) throw AssertionError()
}
fun testR1xE4() {
// with possible local optimizations
if ('4' in '1' downTo '3' != range1.contains('4')) throw AssertionError()
if ('4' !in '1' downTo '3' != !range1.contains('4')) throw AssertionError()
if (!('4' in '1' downTo '3') != !range1.contains('4')) throw AssertionError()
if (!('4' !in '1' downTo '3') != range1.contains('4')) throw AssertionError()
// no local optimizations
if (element4 in '1' downTo '3' != range1.contains(element4)) throw AssertionError()
if (element4 !in '1' downTo '3' != !range1.contains(element4)) throw AssertionError()
if (!(element4 in '1' downTo '3') != !range1.contains(element4)) throw AssertionError()
if (!(element4 !in '1' downTo '3') != range1.contains(element4)) throw AssertionError()
}
@@ -0,0 +1,159 @@
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
val range0 = '1' .. '3'
val range1 = '3' .. '1'
val element0 = '0'
val element1 = '1'
val element2 = '2'
val element3 = '3'
val element4 = '4'
fun box(): String {
testR0xE0()
testR0xE1()
testR0xE2()
testR0xE3()
testR0xE4()
testR1xE0()
testR1xE1()
testR1xE2()
testR1xE3()
testR1xE4()
return "OK"
}
fun testR0xE0() {
// with possible local optimizations
if ('0' in '1' .. '3' != range0.contains('0')) throw AssertionError()
if ('0' !in '1' .. '3' != !range0.contains('0')) throw AssertionError()
if (!('0' in '1' .. '3') != !range0.contains('0')) throw AssertionError()
if (!('0' !in '1' .. '3') != range0.contains('0')) throw AssertionError()
// no local optimizations
if (element0 in '1' .. '3' != range0.contains(element0)) throw AssertionError()
if (element0 !in '1' .. '3' != !range0.contains(element0)) throw AssertionError()
if (!(element0 in '1' .. '3') != !range0.contains(element0)) throw AssertionError()
if (!(element0 !in '1' .. '3') != range0.contains(element0)) throw AssertionError()
}
fun testR0xE1() {
// with possible local optimizations
if ('1' in '1' .. '3' != range0.contains('1')) throw AssertionError()
if ('1' !in '1' .. '3' != !range0.contains('1')) throw AssertionError()
if (!('1' in '1' .. '3') != !range0.contains('1')) throw AssertionError()
if (!('1' !in '1' .. '3') != range0.contains('1')) throw AssertionError()
// no local optimizations
if (element1 in '1' .. '3' != range0.contains(element1)) throw AssertionError()
if (element1 !in '1' .. '3' != !range0.contains(element1)) throw AssertionError()
if (!(element1 in '1' .. '3') != !range0.contains(element1)) throw AssertionError()
if (!(element1 !in '1' .. '3') != range0.contains(element1)) throw AssertionError()
}
fun testR0xE2() {
// with possible local optimizations
if ('2' in '1' .. '3' != range0.contains('2')) throw AssertionError()
if ('2' !in '1' .. '3' != !range0.contains('2')) throw AssertionError()
if (!('2' in '1' .. '3') != !range0.contains('2')) throw AssertionError()
if (!('2' !in '1' .. '3') != range0.contains('2')) throw AssertionError()
// no local optimizations
if (element2 in '1' .. '3' != range0.contains(element2)) throw AssertionError()
if (element2 !in '1' .. '3' != !range0.contains(element2)) throw AssertionError()
if (!(element2 in '1' .. '3') != !range0.contains(element2)) throw AssertionError()
if (!(element2 !in '1' .. '3') != range0.contains(element2)) throw AssertionError()
}
fun testR0xE3() {
// with possible local optimizations
if ('3' in '1' .. '3' != range0.contains('3')) throw AssertionError()
if ('3' !in '1' .. '3' != !range0.contains('3')) throw AssertionError()
if (!('3' in '1' .. '3') != !range0.contains('3')) throw AssertionError()
if (!('3' !in '1' .. '3') != range0.contains('3')) throw AssertionError()
// no local optimizations
if (element3 in '1' .. '3' != range0.contains(element3)) throw AssertionError()
if (element3 !in '1' .. '3' != !range0.contains(element3)) throw AssertionError()
if (!(element3 in '1' .. '3') != !range0.contains(element3)) throw AssertionError()
if (!(element3 !in '1' .. '3') != range0.contains(element3)) throw AssertionError()
}
fun testR0xE4() {
// with possible local optimizations
if ('4' in '1' .. '3' != range0.contains('4')) throw AssertionError()
if ('4' !in '1' .. '3' != !range0.contains('4')) throw AssertionError()
if (!('4' in '1' .. '3') != !range0.contains('4')) throw AssertionError()
if (!('4' !in '1' .. '3') != range0.contains('4')) throw AssertionError()
// no local optimizations
if (element4 in '1' .. '3' != range0.contains(element4)) throw AssertionError()
if (element4 !in '1' .. '3' != !range0.contains(element4)) throw AssertionError()
if (!(element4 in '1' .. '3') != !range0.contains(element4)) throw AssertionError()
if (!(element4 !in '1' .. '3') != range0.contains(element4)) throw AssertionError()
}
fun testR1xE0() {
// with possible local optimizations
if ('0' in '3' .. '1' != range1.contains('0')) throw AssertionError()
if ('0' !in '3' .. '1' != !range1.contains('0')) throw AssertionError()
if (!('0' in '3' .. '1') != !range1.contains('0')) throw AssertionError()
if (!('0' !in '3' .. '1') != range1.contains('0')) throw AssertionError()
// no local optimizations
if (element0 in '3' .. '1' != range1.contains(element0)) throw AssertionError()
if (element0 !in '3' .. '1' != !range1.contains(element0)) throw AssertionError()
if (!(element0 in '3' .. '1') != !range1.contains(element0)) throw AssertionError()
if (!(element0 !in '3' .. '1') != range1.contains(element0)) throw AssertionError()
}
fun testR1xE1() {
// with possible local optimizations
if ('1' in '3' .. '1' != range1.contains('1')) throw AssertionError()
if ('1' !in '3' .. '1' != !range1.contains('1')) throw AssertionError()
if (!('1' in '3' .. '1') != !range1.contains('1')) throw AssertionError()
if (!('1' !in '3' .. '1') != range1.contains('1')) throw AssertionError()
// no local optimizations
if (element1 in '3' .. '1' != range1.contains(element1)) throw AssertionError()
if (element1 !in '3' .. '1' != !range1.contains(element1)) throw AssertionError()
if (!(element1 in '3' .. '1') != !range1.contains(element1)) throw AssertionError()
if (!(element1 !in '3' .. '1') != range1.contains(element1)) throw AssertionError()
}
fun testR1xE2() {
// with possible local optimizations
if ('2' in '3' .. '1' != range1.contains('2')) throw AssertionError()
if ('2' !in '3' .. '1' != !range1.contains('2')) throw AssertionError()
if (!('2' in '3' .. '1') != !range1.contains('2')) throw AssertionError()
if (!('2' !in '3' .. '1') != range1.contains('2')) throw AssertionError()
// no local optimizations
if (element2 in '3' .. '1' != range1.contains(element2)) throw AssertionError()
if (element2 !in '3' .. '1' != !range1.contains(element2)) throw AssertionError()
if (!(element2 in '3' .. '1') != !range1.contains(element2)) throw AssertionError()
if (!(element2 !in '3' .. '1') != range1.contains(element2)) throw AssertionError()
}
fun testR1xE3() {
// with possible local optimizations
if ('3' in '3' .. '1' != range1.contains('3')) throw AssertionError()
if ('3' !in '3' .. '1' != !range1.contains('3')) throw AssertionError()
if (!('3' in '3' .. '1') != !range1.contains('3')) throw AssertionError()
if (!('3' !in '3' .. '1') != range1.contains('3')) throw AssertionError()
// no local optimizations
if (element3 in '3' .. '1' != range1.contains(element3)) throw AssertionError()
if (element3 !in '3' .. '1' != !range1.contains(element3)) throw AssertionError()
if (!(element3 in '3' .. '1') != !range1.contains(element3)) throw AssertionError()
if (!(element3 !in '3' .. '1') != range1.contains(element3)) throw AssertionError()
}
fun testR1xE4() {
// with possible local optimizations
if ('4' in '3' .. '1' != range1.contains('4')) throw AssertionError()
if ('4' !in '3' .. '1' != !range1.contains('4')) throw AssertionError()
if (!('4' in '3' .. '1') != !range1.contains('4')) throw AssertionError()
if (!('4' !in '3' .. '1') != range1.contains('4')) throw AssertionError()
// no local optimizations
if (element4 in '3' .. '1' != range1.contains(element4)) throw AssertionError()
if (element4 !in '3' .. '1' != !range1.contains(element4)) throw AssertionError()
if (!(element4 in '3' .. '1') != !range1.contains(element4)) throw AssertionError()
if (!(element4 !in '3' .. '1') != range1.contains(element4)) throw AssertionError()
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,159 @@
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
val range0 = '1' until '3'
val range1 = '3' until '1'
val element0 = '0'
val element1 = '1'
val element2 = '2'
val element3 = '3'
val element4 = '4'
fun box(): String {
testR0xE0()
testR0xE1()
testR0xE2()
testR0xE3()
testR0xE4()
testR1xE0()
testR1xE1()
testR1xE2()
testR1xE3()
testR1xE4()
return "OK"
}
fun testR0xE0() {
// with possible local optimizations
if ('0' in '1' until '3' != range0.contains('0')) throw AssertionError()
if ('0' !in '1' until '3' != !range0.contains('0')) throw AssertionError()
if (!('0' in '1' until '3') != !range0.contains('0')) throw AssertionError()
if (!('0' !in '1' until '3') != range0.contains('0')) throw AssertionError()
// no local optimizations
if (element0 in '1' until '3' != range0.contains(element0)) throw AssertionError()
if (element0 !in '1' until '3' != !range0.contains(element0)) throw AssertionError()
if (!(element0 in '1' until '3') != !range0.contains(element0)) throw AssertionError()
if (!(element0 !in '1' until '3') != range0.contains(element0)) throw AssertionError()
}
fun testR0xE1() {
// with possible local optimizations
if ('1' in '1' until '3' != range0.contains('1')) throw AssertionError()
if ('1' !in '1' until '3' != !range0.contains('1')) throw AssertionError()
if (!('1' in '1' until '3') != !range0.contains('1')) throw AssertionError()
if (!('1' !in '1' until '3') != range0.contains('1')) throw AssertionError()
// no local optimizations
if (element1 in '1' until '3' != range0.contains(element1)) throw AssertionError()
if (element1 !in '1' until '3' != !range0.contains(element1)) throw AssertionError()
if (!(element1 in '1' until '3') != !range0.contains(element1)) throw AssertionError()
if (!(element1 !in '1' until '3') != range0.contains(element1)) throw AssertionError()
}
fun testR0xE2() {
// with possible local optimizations
if ('2' in '1' until '3' != range0.contains('2')) throw AssertionError()
if ('2' !in '1' until '3' != !range0.contains('2')) throw AssertionError()
if (!('2' in '1' until '3') != !range0.contains('2')) throw AssertionError()
if (!('2' !in '1' until '3') != range0.contains('2')) throw AssertionError()
// no local optimizations
if (element2 in '1' until '3' != range0.contains(element2)) throw AssertionError()
if (element2 !in '1' until '3' != !range0.contains(element2)) throw AssertionError()
if (!(element2 in '1' until '3') != !range0.contains(element2)) throw AssertionError()
if (!(element2 !in '1' until '3') != range0.contains(element2)) throw AssertionError()
}
fun testR0xE3() {
// with possible local optimizations
if ('3' in '1' until '3' != range0.contains('3')) throw AssertionError()
if ('3' !in '1' until '3' != !range0.contains('3')) throw AssertionError()
if (!('3' in '1' until '3') != !range0.contains('3')) throw AssertionError()
if (!('3' !in '1' until '3') != range0.contains('3')) throw AssertionError()
// no local optimizations
if (element3 in '1' until '3' != range0.contains(element3)) throw AssertionError()
if (element3 !in '1' until '3' != !range0.contains(element3)) throw AssertionError()
if (!(element3 in '1' until '3') != !range0.contains(element3)) throw AssertionError()
if (!(element3 !in '1' until '3') != range0.contains(element3)) throw AssertionError()
}
fun testR0xE4() {
// with possible local optimizations
if ('4' in '1' until '3' != range0.contains('4')) throw AssertionError()
if ('4' !in '1' until '3' != !range0.contains('4')) throw AssertionError()
if (!('4' in '1' until '3') != !range0.contains('4')) throw AssertionError()
if (!('4' !in '1' until '3') != range0.contains('4')) throw AssertionError()
// no local optimizations
if (element4 in '1' until '3' != range0.contains(element4)) throw AssertionError()
if (element4 !in '1' until '3' != !range0.contains(element4)) throw AssertionError()
if (!(element4 in '1' until '3') != !range0.contains(element4)) throw AssertionError()
if (!(element4 !in '1' until '3') != range0.contains(element4)) throw AssertionError()
}
fun testR1xE0() {
// with possible local optimizations
if ('0' in '3' until '1' != range1.contains('0')) throw AssertionError()
if ('0' !in '3' until '1' != !range1.contains('0')) throw AssertionError()
if (!('0' in '3' until '1') != !range1.contains('0')) throw AssertionError()
if (!('0' !in '3' until '1') != range1.contains('0')) throw AssertionError()
// no local optimizations
if (element0 in '3' until '1' != range1.contains(element0)) throw AssertionError()
if (element0 !in '3' until '1' != !range1.contains(element0)) throw AssertionError()
if (!(element0 in '3' until '1') != !range1.contains(element0)) throw AssertionError()
if (!(element0 !in '3' until '1') != range1.contains(element0)) throw AssertionError()
}
fun testR1xE1() {
// with possible local optimizations
if ('1' in '3' until '1' != range1.contains('1')) throw AssertionError()
if ('1' !in '3' until '1' != !range1.contains('1')) throw AssertionError()
if (!('1' in '3' until '1') != !range1.contains('1')) throw AssertionError()
if (!('1' !in '3' until '1') != range1.contains('1')) throw AssertionError()
// no local optimizations
if (element1 in '3' until '1' != range1.contains(element1)) throw AssertionError()
if (element1 !in '3' until '1' != !range1.contains(element1)) throw AssertionError()
if (!(element1 in '3' until '1') != !range1.contains(element1)) throw AssertionError()
if (!(element1 !in '3' until '1') != range1.contains(element1)) throw AssertionError()
}
fun testR1xE2() {
// with possible local optimizations
if ('2' in '3' until '1' != range1.contains('2')) throw AssertionError()
if ('2' !in '3' until '1' != !range1.contains('2')) throw AssertionError()
if (!('2' in '3' until '1') != !range1.contains('2')) throw AssertionError()
if (!('2' !in '3' until '1') != range1.contains('2')) throw AssertionError()
// no local optimizations
if (element2 in '3' until '1' != range1.contains(element2)) throw AssertionError()
if (element2 !in '3' until '1' != !range1.contains(element2)) throw AssertionError()
if (!(element2 in '3' until '1') != !range1.contains(element2)) throw AssertionError()
if (!(element2 !in '3' until '1') != range1.contains(element2)) throw AssertionError()
}
fun testR1xE3() {
// with possible local optimizations
if ('3' in '3' until '1' != range1.contains('3')) throw AssertionError()
if ('3' !in '3' until '1' != !range1.contains('3')) throw AssertionError()
if (!('3' in '3' until '1') != !range1.contains('3')) throw AssertionError()
if (!('3' !in '3' until '1') != range1.contains('3')) throw AssertionError()
// no local optimizations
if (element3 in '3' until '1' != range1.contains(element3)) throw AssertionError()
if (element3 !in '3' until '1' != !range1.contains(element3)) throw AssertionError()
if (!(element3 in '3' until '1') != !range1.contains(element3)) throw AssertionError()
if (!(element3 !in '3' until '1') != range1.contains(element3)) throw AssertionError()
}
fun testR1xE4() {
// with possible local optimizations
if ('4' in '3' until '1' != range1.contains('4')) throw AssertionError()
if ('4' !in '3' until '1' != !range1.contains('4')) throw AssertionError()
if (!('4' in '3' until '1') != !range1.contains('4')) throw AssertionError()
if (!('4' !in '3' until '1') != range1.contains('4')) throw AssertionError()
// no local optimizations
if (element4 in '3' until '1' != range1.contains(element4)) throw AssertionError()
if (element4 !in '3' until '1' != !range1.contains(element4)) throw AssertionError()
if (!(element4 in '3' until '1') != !range1.contains(element4)) throw AssertionError()
if (!(element4 !in '3' until '1') != range1.contains(element4)) throw AssertionError()
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
val range0 = 3 downTo 1
val range1 = 1 downTo 3
val element0 = 1
fun box(): String {
testR0xE0()
testR1xE0()
return "OK"
}
fun testR0xE0() {
// with possible local optimizations
if (1 in 3 downTo 1 != range0.contains(1)) throw AssertionError()
if (1 !in 3 downTo 1 != !range0.contains(1)) throw AssertionError()
if (!(1 in 3 downTo 1) != !range0.contains(1)) throw AssertionError()
if (!(1 !in 3 downTo 1) != range0.contains(1)) throw AssertionError()
// no local optimizations
if (element0 in 3 downTo 1 != range0.contains(element0)) throw AssertionError()
if (element0 !in 3 downTo 1 != !range0.contains(element0)) throw AssertionError()
if (!(element0 in 3 downTo 1) != !range0.contains(element0)) throw AssertionError()
if (!(element0 !in 3 downTo 1) != range0.contains(element0)) throw AssertionError()
}
fun testR1xE0() {
// with possible local optimizations
if (1 in 1 downTo 3 != range1.contains(1)) throw AssertionError()
if (1 !in 1 downTo 3 != !range1.contains(1)) throw AssertionError()
if (!(1 in 1 downTo 3) != !range1.contains(1)) throw AssertionError()
if (!(1 !in 1 downTo 3) != range1.contains(1)) throw AssertionError()
// no local optimizations
if (element0 in 1 downTo 3 != range1.contains(element0)) throw AssertionError()
if (element0 !in 1 downTo 3 != !range1.contains(element0)) throw AssertionError()
if (!(element0 in 1 downTo 3) != !range1.contains(element0)) throw AssertionError()
if (!(element0 !in 1 downTo 3) != range1.contains(element0)) throw AssertionError()
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
val range0 = 3L downTo 1L
val range1 = 1L downTo 3L
val element0 = 1L
fun box(): String {
testR0xE0()
testR1xE0()
return "OK"
}
fun testR0xE0() {
// with possible local optimizations
if (1L in 3L downTo 1L != range0.contains(1L)) throw AssertionError()
if (1L !in 3L downTo 1L != !range0.contains(1L)) throw AssertionError()
if (!(1L in 3L downTo 1L) != !range0.contains(1L)) throw AssertionError()
if (!(1L !in 3L downTo 1L) != range0.contains(1L)) throw AssertionError()
// no local optimizations
if (element0 in 3L downTo 1L != range0.contains(element0)) throw AssertionError()
if (element0 !in 3L downTo 1L != !range0.contains(element0)) throw AssertionError()
if (!(element0 in 3L downTo 1L) != !range0.contains(element0)) throw AssertionError()
if (!(element0 !in 3L downTo 1L) != range0.contains(element0)) throw AssertionError()
}
fun testR1xE0() {
// with possible local optimizations
if (1L in 1L downTo 3L != range1.contains(1L)) throw AssertionError()
if (1L !in 1L downTo 3L != !range1.contains(1L)) throw AssertionError()
if (!(1L in 1L downTo 3L) != !range1.contains(1L)) throw AssertionError()
if (!(1L !in 1L downTo 3L) != range1.contains(1L)) throw AssertionError()
// no local optimizations
if (element0 in 1L downTo 3L != range1.contains(element0)) throw AssertionError()
if (element0 !in 1L downTo 3L != !range1.contains(element0)) throw AssertionError()
if (!(element0 in 1L downTo 3L) != !range1.contains(element0)) throw AssertionError()
if (!(element0 !in 1L downTo 3L) != range1.contains(element0)) throw AssertionError()
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,21 +0,0 @@
// WITH_RUNTIME
val ints = intArrayOf(1, 2, 3)
val objs = arrayOf(1, 2, 3)
val i1 = 1
fun box(): String {
// NB partially const-folded in JVM BE
if (!(1 in ints.indices)) return "Fail 1 in IntArray.indices"
if (1 !in ints.indices) return "Fail 1 !in IntArray.indices"
if (!(1 in objs.indices)) return "Fail 1 in Array.indices"
if (1 !in objs.indices) return "Fail 1 !in Array.indices"
if (!(i1 in ints.indices)) return "Fail i1 in IntArray.indices"
if (i1 !in ints.indices) return "Fail i1 !in IntArray.indices"
if (!(i1 in objs.indices)) return "Fail i1 in Array.indices"
if (i1 !in objs.indices) return "Fail i1 !in Array.indices"
return "OK"
}
@@ -1,16 +0,0 @@
// WITH_RUNTIME
val cs = "123"
val i1 = 1
fun box(): String {
// NB partially const-folded in JVM BE
if (!(1 in cs.indices)) return "Fail 1 in CharSequence.indices"
if (1 !in cs.indices) return "Fail 1 !in CharSequence.indices"
if (!(i1 in cs.indices)) return "Fail i1 in CharSequence.indices"
if (i1 !in cs.indices) return "Fail i1 !in CharSequence.indices"
return "OK"
}
@@ -1,16 +0,0 @@
// WITH_RUNTIME
val xs = listOf(1, 2, 3)
val i1 = 1
fun box(): String {
// NB partially const-folded in JVM BE
if (!(1 in xs.indices)) return "Fail 1 in Collection.indices"
if (1 !in xs.indices) return "Fail 1 !in Collection.indices"
if (!(i1 in xs.indices)) return "Fail i1 in Collection.indices"
if (i1 !in xs.indices) return "Fail i1 !in Collection.indices"
return "OK"
}