diff options
Diffstat (limited to 'cli/tests/051_wasm_import')
-rw-r--r-- | cli/tests/051_wasm_import/remote.ts | 3 | ||||
-rw-r--r-- | cli/tests/051_wasm_import/simple.wasm | bin | 226 -> 0 bytes | |||
-rw-r--r-- | cli/tests/051_wasm_import/simple.wat | 31 | ||||
-rw-r--r-- | cli/tests/051_wasm_import/wasm-dep.js | 17 |
4 files changed, 0 insertions, 51 deletions
diff --git a/cli/tests/051_wasm_import/remote.ts b/cli/tests/051_wasm_import/remote.ts deleted file mode 100644 index 761a5248e..000000000 --- a/cli/tests/051_wasm_import/remote.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function jsRemoteFn(): number { - return 2019; -} diff --git a/cli/tests/051_wasm_import/simple.wasm b/cli/tests/051_wasm_import/simple.wasm Binary files differdeleted file mode 100644 index 8e544fe30..000000000 --- a/cli/tests/051_wasm_import/simple.wasm +++ /dev/null diff --git a/cli/tests/051_wasm_import/simple.wat b/cli/tests/051_wasm_import/simple.wat deleted file mode 100644 index 5e73db97b..000000000 --- a/cli/tests/051_wasm_import/simple.wat +++ /dev/null @@ -1,31 +0,0 @@ -;; From https://github.com/nodejs/node/blob/bbc254db5db672643aad89a436a4938412a5704e/test/fixtures/es-modules/simple.wat -;; MIT Licensed -;; $ wat2wasm simple.wat -o simple.wasm - -(module - (import "./wasm-dep.js" "jsFn" (func $jsFn (result i32))) - (import "./wasm-dep.js" "jsInitFn" (func $jsInitFn)) - (import "http://127.0.0.1:4545/cli/tests/051_wasm_import/remote.ts" "jsRemoteFn" (func $jsRemoteFn (result i32))) - (export "add" (func $add)) - (export "addImported" (func $addImported)) - (export "addRemote" (func $addRemote)) - (start $startFn) - (func $startFn - call $jsInitFn - ) - (func $add (param $a i32) (param $b i32) (result i32) - local.get $a - local.get $b - i32.add - ) - (func $addImported (param $a i32) (result i32) - local.get $a - call $jsFn - i32.add - ) - (func $addRemote (param $a i32) (result i32) - local.get $a - call $jsRemoteFn - i32.add - ) -) diff --git a/cli/tests/051_wasm_import/wasm-dep.js b/cli/tests/051_wasm_import/wasm-dep.js deleted file mode 100644 index 70b16348b..000000000 --- a/cli/tests/051_wasm_import/wasm-dep.js +++ /dev/null @@ -1,17 +0,0 @@ -function assertEquals(actual, expected, msg) { - if (actual !== expected) { - throw new Error(msg || ""); - } -} - -export function jsFn() { - state = "WASM JS Function Executed"; - return 42; -} - -export let state = "JS Function Executed"; - -export function jsInitFn() { - assertEquals(state, "JS Function Executed", "Incorrect state"); - state = "WASM Start Executed"; -} |