review fixes + DCE data update + test (un)muting

This commit is contained in:
Anton Bannykh
2018-08-17 15:58:13 +03:00
committed by Ilya Gorbunov
parent 2663d9751a
commit a83baee67b
52 changed files with 264 additions and 200 deletions
@@ -1,5 +1,5 @@
// WITH_UNSIGNED
// IGNORE_BACKEND: JVM_IR, JS_IR, JS
// IGNORE_BACKEND: JVM_IR, JS_IR
val xs = Array(2) { 42u }
@@ -1,6 +1,6 @@
// !LANGUAGE: +InlineClasses
// WITH_UNSIGNED
// IGNORE_BACKEND: JVM_IR, JS_IR, JS
// IGNORE_BACKEND: JVM_IR, JS_IR
inline class Data(val data: Array<UInt>)
@@ -1,5 +1,5 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR, JS_IR
// IGNORE_BACKEND: JVM_IR
inline class Foo(val x: Int)
inline class FooRef(val y: String)
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -6,13 +6,14 @@ const val HUNDRED: UByte = 100u
const val MAX_LONG: ULong = ULong.MAX_VALUE
const val MAX_BYTE_STRING = "$MAX_BYTE"
const val MAX_LONG_STRING = "$MAX_LONG"
fun box(): String {
val maxByteStringSingle = "$MAX_BYTE"
if (maxByteStringSingle != MAX_BYTE.toString() || maxByteStringSingle != "255") return "Fail 1: $maxByteStringSingle"
val maxLongStringSingle = "$MAX_LONG"
if (maxLongStringSingle != MAX_LONG.toString() || maxLongStringSingle != "18446744073709551615") return "Fail 1.5: $maxLongStringSingle"
val twoHundredUByte = "${(HUNDRED * 2u).toUByte()}"
if (twoHundredUByte != "200") return "Fail 2: $twoHundredUByte"
@@ -23,5 +24,12 @@ fun box(): String {
val complex = "Max UByte: $MAX_BYTE, next: $nonConst"
if (complex != "Max UByte: 255, next: 256") return "Fail 4: $complex"
val maxLongStringSingle = "$MAX_LONG"
if (maxLongStringSingle != MAX_LONG.toString() || maxLongStringSingle != "18446744073709551615") return "Fail 5: $maxLongStringSingle"
if (MAX_BYTE_STRING != "255") return "Fail 6: $MAX_BYTE_STRING"
if (MAX_LONG_STRING != "18446744073709551615") return "Fail 7: $MAX_LONG_STRING"
return "OK"
}
@@ -27,6 +27,10 @@ fun box(): String {
val complexInlinedUInts = inlinedUInt(*inlinedUInts, 3u, *inlinedUInts)
if (sum(*complexInlinedUInts) != 11u) return "Fail 5"
if (nullableUInts !is UIntArray) return "Fail 6"
if (inlinedUInts !is UIntArray) return "Fail 7"
return "OK"
}