Files
kotlin-fork/js/js.translator/testData/wasmBox/passedCommonTests/constants/float.kt
T
Svyatoslav Kuzmich 6e6ffa12a6 [WASM] Initial infrastructure
- New module ":compiler:backend.wasm"
    - Initial compiler infra (driver, phaser, context)
    - Subset of Wasm AST
    - Skeleton of IR -> Wasm AST
    - Wasm AST -> WAT transformer

- Testing infra

- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00

19 lines
624 B
Kotlin
Vendored

fun box(): String {
if (1F != 1.toFloat()) return "fail 1"
if (1.0F != 1.0.toFloat()) return "fail 2"
if (1e1F != 1e1.toFloat()) return "fail 3"
if (1.0e1F != 1.0e1.toFloat()) return "fail 4"
if (1e-1F != 1e-1.toFloat()) return "fail 5"
if (1.0e-1F != 1.0e-1.toFloat()) return "fail 6"
if (1f != 1.toFloat()) return "fail 7"
if (1.0f != 1.0.toFloat()) return "fail 8"
if (1e1f != 1e1.toFloat()) return "fail 9"
if (1.0e1f != 1.0e1.toFloat()) return "fail 10"
if (1e-1f != 1e-1.toFloat()) return "fail 11"
if (1.0e-1f != 1.0e-1.toFloat()) return "fail 12"
return "OK"
}