[Wasm] add simple tests to track the size of wasm and mjs files

This commit is contained in:
Zalim Bashorov
2023-03-29 01:34:38 +02:00
parent 1697a28bf0
commit 6e3eef7a88
19 changed files with 244 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 146_294
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 8_247
// FILE: test.kt
@JsExport
fun add(a: Int, b: Int) = a + b
// FILE: entry.mjs
import k from "./index.mjs"
const r = k.add(2, 3);
if (r != 5) throw Error("Wrong result: " + r);