diff --git a/compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt b/compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt index 29f7c3b30b2..c5a0bfe5fce 100644 --- a/compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt +++ b/compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: JS_IR, NATIVE +// IGNORE_BACKEND: NATIVE // WITH_RUNTIME import kotlin.test.assertTrue diff --git a/compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt b/compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt index f4cbb5ea13d..dffd69ffd7e 100644 --- a/compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt +++ b/compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: NATIVE // WITH_RUNTIME diff --git a/libraries/stdlib/js/irRuntime/tests.kt b/libraries/stdlib/js/irRuntime/tests.kt index db6f72ee126..1deecdb01b8 100644 --- a/libraries/stdlib/js/irRuntime/tests.kt +++ b/libraries/stdlib/js/irRuntime/tests.kt @@ -5,7 +5,23 @@ package kotlin.test +// This file plugs some declaration from "kotlin.test" library used in tests. + fun assertEquals(a: T, b: T) { if (a != b) throw Exception("") } +fun assertTrue(x: Boolean) { + if (!x) throw Exception("") +} + +fun assertFalse(x: Boolean) { + if (x) throw Exception("") +} + +fun assertNotNull(actual: T?, message: String? = null): T { + if (actual == null) throw Exception("") + return actual +} + +