c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
30 lines
870 B
Kotlin
Vendored
30 lines
870 B
Kotlin
Vendored
// IGNORE_BACKEND: WASM
|
|
// WASM_MUTE_REASON: STDLIB_TEXT
|
|
// WITH_STDLIB
|
|
|
|
import kotlin.test.*
|
|
|
|
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
|
@kotlin.jvm.JvmInline
|
|
value class TestUIntArrayW(val x: UIntArray)
|
|
|
|
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
|
@kotlin.jvm.JvmInline
|
|
value class InlineCharArray(val x: CharArray) {
|
|
override fun toString(): String = x.contentToString()
|
|
}
|
|
|
|
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
|
@kotlin.jvm.JvmInline
|
|
value class TestInlineCharArrayW(val x: InlineCharArray)
|
|
|
|
fun box(): String {
|
|
val t1 = TestUIntArrayW(UIntArray(1)).toString()
|
|
if (!t1.startsWith("TestUIntArrayW")) throw AssertionError(t1)
|
|
|
|
val t2 = TestInlineCharArrayW(InlineCharArray(charArrayOf('a'))).toString()
|
|
if (!t2.startsWith("TestInlineCharArrayW")) throw AssertionError(t2)
|
|
|
|
return "OK"
|
|
}
|