Files
kotlin-fork/js/js.translator/testData/wasmBox/number/longUnaryOperations.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

33 lines
436 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1225
package foo
fun box(): String {
var x: Long = 2L
x++
assertEquals(3L, x)
++x
assertEquals(4L, x)
var y = x++
assertEquals(4L, y)
assertEquals(5L, x)
y = ++x
assertEquals(6L, y)
assertEquals(6L, x)
x--
assertEquals(5L, x)
--x
assertEquals(4L, x)
y = +x
assertEquals(4L, y)
y = -x
assertEquals(-4L, y)
return "OK"
}