[Wasm] stdlib API: make kotlin.assert internal
Being disabled by default and not well-documented, these functions cause confusion among early adopters as to why their code don't work properly. Assert APIs need a proper design across Kotlin platforms. Since APIs are not available in common code and K/JS, it is premature to have such a general feature in a new experimental platform. Compiler tests: * Mute tests that rely on assert. * Replace JVM-specific assert calls with require calls and unmute passed K/JS tests. Merge-request: KT-MR-8636 Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
a8f547d080
commit
abf70a586c
@@ -1,8 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_STDLIB
|
||||
|
||||
inline fun<reified T1, reified T2> createArray(n: Int, crossinline block: () -> Pair<T1, T2>): Pair<Array<T1>, Array<T2>> {
|
||||
@@ -19,9 +14,9 @@ fun box(): String {
|
||||
val y = createArray(5) { Pair(1, "test") }
|
||||
val x = recursive<Int, Int, Int, Int, Int, Int, String>(){ "abc" }
|
||||
|
||||
assert(y.first.all { it == 1 } )
|
||||
assert(y.second.all { it == "test" })
|
||||
assert(x.first.all { it == "abc" })
|
||||
assert(x.second.all { it == "abc" })
|
||||
require(y.first.all { it == 1 } )
|
||||
require(y.second.all { it == "test" })
|
||||
require(x.first.all { it == "abc" })
|
||||
require(x.second.all { it == "abc" })
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user