New J2K: Fix existing test data

This commit is contained in:
Ilya Kirillov
2019-02-03 16:42:16 +03:00
committed by Ilya Kirillov
parent 7e30b9e7f5
commit f8b8d07621
27 changed files with 546 additions and 143 deletions
+40
View File
@@ -0,0 +1,40 @@
internal class Test {
fun printNumbers() {
for (i1 in 0..0)
println(i1)
val b: Byte = 1
for (i2 in 0 until b)
println(i2)
val s: Short = 1
for (i3 in 0 until s)
println(i3)
val l = 1L
for (i4 in 0 until l)
println(i4)
val d = 1.0
var i5 = 0
while (i5 < d) {
println(i5)
i5++
}
val f = 1.0f
var i6 = 0
while (i6 < f) {
println(i6)
i6++
}
val c = 1.toChar()
var i7 = 0
while (i7 < c.toInt()) {
println(i7)
i7++
}
}
}
+137
View File
@@ -0,0 +1,137 @@
internal class A {
fun equals() {
val i = 1
val b: Byte = 1
val s: Short = 1
val l: Long = 1
val d = 1.0
val f = 1.0f
val c = 1.toChar()
t(i == i)
t(i == b.toInt())
t(i == s.toInt())
t(i.toLong() == l)
t(i.toDouble() == d)
t(i.toFloat() == f)
t(i == c.toInt())
t(b.toInt() == i)
t(b == b)
t(b.toShort() == s)
t(b.toLong() == l)
t(b.toDouble() == d)
t(b.toFloat() == f)
t(b == c.toByte())
t(s.toInt() == i)
t(s == b.toShort())
t(s == s)
t(s.toLong() == l)
t(s.toDouble() == d)
t(s.toFloat() == f)
t(s == c.toShort())
t(l == i.toLong())
t(l == b.toLong())
t(l == s.toLong())
t(l == l)
t(l.toDouble() == d)
t(l.toFloat() == f)
t(l == c.toLong())
t(d == i.toDouble())
t(d == b.toDouble())
t(d == s.toDouble())
t(d == l.toDouble())
t(d == d)
t(d == f.toDouble())
t(d == c.toDouble())
t(f == i.toFloat())
t(f == b.toFloat())
t(f == s.toFloat())
t(f == l.toFloat())
t(f.toDouble() == d)
t(f == f)
t(f == c.toFloat())
t(c.toInt() == i)
t(c.toByte() == b)
t(c.toShort() == s)
t(c.toLong() == l)
t(c.toDouble() == d)
t(c.toFloat() == f)
t(c == c)
t(i.toDouble() != d)
}
fun compare() {
val i = 1
val b: Byte = 1
val s: Short = 1
val l: Long = 1
val d = 1.0
val f = 1.0f
val c = 1.toChar()
t(i > i)
t(i > b)
t(i > s)
t(i > l)
t(i > d)
t(i > f)
t(i > c.toInt())
t(b > i)
t(b > b)
t(b > s)
t(b > l)
t(b > d)
t(b > f)
t(b > c.toByte())
t(s > i)
t(s > b)
t(s > s)
t(s > l)
t(s > d)
t(s > f)
t(s > c.toShort())
t(l > i)
t(l > b)
t(l > s)
t(l > l)
t(l > d)
t(l > f)
t(l > c.toLong())
t(d > i)
t(d > b)
t(d > s)
t(d > l)
t(d > d)
t(d > f)
t(d > c.toDouble())
t(f > i)
t(f > b)
t(f > s)
t(f > l)
t(f > d)
t(f > f)
t(f > c.toFloat())
t(c.toInt() > i)
t(c.toByte() > b)
t(c.toShort() > s)
t(c.toLong() > l)
t(c.toDouble() > d)
t(c.toFloat() > f)
t(c > c)
}
private fun t(b: Boolean) {}
}