Files
kotlin-fork/js/js.translator/testData/box/polyfills/trunc/truncWithoutExistedIntrinsic.kt
T

17 lines
288 B
Kotlin
Vendored

// WITH_STDLIB
// TARGET_BACKEND: JS_IR
// FILE: main.js
Math.trunc = undefined;
// FILE: main.kt
import kotlin.math.truncate
fun box(): String {
val result = truncate(1.188)
assertEquals(result, 1)
assertEquals(js("Math.trunc.called"), js("undefined"))
return "OK"
}