[TEST] Fix long literal in testdata broken in 4374c06

This commit is contained in:
Dmitriy Novozhilov
2020-09-23 15:22:03 +03:00
parent a2bde2ffb2
commit 10e7c0f1b2
4 changed files with 5 additions and 5 deletions
@@ -1,7 +1,7 @@
class Box<T>(val value: T) class Box<T>(val value: T)
fun box() : String { fun box() : String {
val b = Box<Long>(2l * 3) val b = Box<Long>(2L * 3)
val expected: Long? = 6L val expected: Long? = 6L
return if (b.value == expected) "OK" else "fail" return if (b.value == expected) "OK" else "fail"
} }
@@ -1,7 +1,7 @@
class Box<T>(val value: T) class Box<T>(val value: T)
fun box() : String { fun box() : String {
val b = Box<Long>(x@ (1l + 2)) val b = Box<Long>(x@ (1L + 2))
val expected: Long? = 3L val expected: Long? = 3L
return if (b.value == expected) "OK" else "fail" return if (b.value == expected) "OK" else "fail"
} }
@@ -5,9 +5,9 @@ fun <T> consumeLongAndMaterialize(x: Long): T = null as T
fun consumeAny(x: Any) = x fun consumeAny(x: Any) = x
fun main() { fun main() {
consumeAny(consumeLongAndMaterialize(3l * 1000)) consumeAny(consumeLongAndMaterialize(3L * 1000))
if (true) { if (true) {
consumeLongAndMaterialize(3l * 1000) consumeLongAndMaterialize(3L * 1000)
} else true } else true
} }
@@ -1,4 +1,4 @@
fun testSimple() = Box<Long>(2l * 3) fun testSimple() = Box<Long>(2L * 3)
inline fun <reified T> testArray(n: Int, crossinline block: () -> T): Array<T> { inline fun <reified T> testArray(n: Int, crossinline block: () -> T): Array<T> {
return Array<T>(n) { block() } return Array<T>(n) { block() }