Revert "Clean up test skips after KT-17137"
This reverts commit 715d5e9
This commit is contained in:
@@ -22,5 +22,8 @@ fun test(createIntNotLong: Boolean): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
// Only run this test if primitive array `is` checks work (KT-17137)
|
||||||
|
if ((intArrayOf() as Any) is Array<*>) return "OK"
|
||||||
|
|
||||||
return test(true) + test(false)
|
return test(true) + test(false)
|
||||||
}
|
}
|
||||||
@@ -53,6 +53,9 @@ fun foo(a: Any): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
// Only run this test if primitive array `is` checks work (KT-17137)
|
||||||
|
if ((intArrayOf() as Any) is Array<*>) return "OK"
|
||||||
|
|
||||||
val iA = IntArray(1)
|
val iA = IntArray(1)
|
||||||
if (foo(iA) != 1) return "fail int[]"
|
if (foo(iA) != 1) return "fail int[]"
|
||||||
val sA = ShortArray(1)
|
val sA = ShortArray(1)
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ fun test(b: Boolean): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
// Only run this test if primitive array `is` checks work (KT-17137)
|
||||||
|
if ((intArrayOf() as Any) is Array<*>) return "OK"
|
||||||
|
|
||||||
if (test(true) != "OK") return "fail 1: ${test(true)}"
|
if (test(true) != "OK") return "fail 1: ${test(true)}"
|
||||||
|
|
||||||
if (test(false) != "OK") return "fail 1: ${test(false)}"
|
if (test(false) != "OK") return "fail 1: ${test(false)}"
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ fun test(x: Any): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
// Only run this test if primitive array `is` checks work (KT-17137)
|
||||||
|
if ((intArrayOf() as Any) is Array<*>) return "OK"
|
||||||
|
|
||||||
assertEquals(123, test(intArrayOf(0, 0, 0, 0)))
|
assertEquals(123, test(intArrayOf(0, 0, 0, 0)))
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
@@ -231,6 +231,12 @@ class ArraysTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test fun contentDeepToString() {
|
@Test fun contentDeepToString() {
|
||||||
|
// Don't run this test unless primitive array `is` checks are supported (KT-17137)
|
||||||
|
if ((intArrayOf() as Any) is Array<*>) {
|
||||||
|
assertTrue(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val arr = arrayOf("aa", 1, null, charArrayOf('d'))
|
val arr = arrayOf("aa", 1, null, charArrayOf('d'))
|
||||||
assertEquals("[aa, 1, null, [d]]", arr.contentDeepToString())
|
assertEquals("[aa, 1, null, [d]]", arr.contentDeepToString())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user