[Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
This commit is contained in:
committed by
Space Team
parent
dd9332d9e1
commit
febac0dd5f
@@ -0,0 +1,15 @@
|
||||
// WITH_STDLIB
|
||||
// KT-66080
|
||||
// IGNORE_BACKEND: JS_IR, JS_IR_ES6
|
||||
// KT-66081
|
||||
// IGNORE_BACKEND: WASM
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
assertFailsWith(ArithmeticException::class, { 5 / 0 })
|
||||
assertFailsWith(ArithmeticException::class, { 5 % 0 })
|
||||
assertEquals(1, 5 / try { 0 / 0; 1 } catch (e: ArithmeticException) { 5 })
|
||||
assertEquals(Double.NaN, 0.0 / 0.0)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user