aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-06-01 14:53:51 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-06-04 08:18:07 +0200
commit898609e3b708d1d85d2cef7d8bf985fa2006a797 (patch)
treeef62fa8dff3316d455650ae5ca9bf954841dde4d /test
parent60eeba4194cf878cd3c33e1745962245bb8cb0e9 (diff)
downloadandroid-node-v8-898609e3b708d1d85d2cef7d8bf985fa2006a797.tar.gz
android-node-v8-898609e3b708d1d85d2cef7d8bf985fa2006a797.tar.bz2
android-node-v8-898609e3b708d1d85d2cef7d8bf985fa2006a797.zip
test: add source for test.wasm
The original commit 74e7a4a041fe83f106bc50ebe99c961afb28a0cd ("test: add basic WebAssembly test") references the source for test.wasm and while there are tools to go from wasm to wat but having the source viewable is helpful I think. PR-URL: https://github.com/nodejs/node/pull/21082 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/test.wasmbin44 -> 50 bytes
-rw-r--r--test/fixtures/test.wat10
2 files changed, 10 insertions, 0 deletions
diff --git a/test/fixtures/test.wasm b/test/fixtures/test.wasm
index 8b19588df2..da1b033006 100644
--- a/test/fixtures/test.wasm
+++ b/test/fixtures/test.wasm
Binary files differ
diff --git a/test/fixtures/test.wat b/test/fixtures/test.wat
new file mode 100644
index 0000000000..fa90b17cce
--- /dev/null
+++ b/test/fixtures/test.wat
@@ -0,0 +1,10 @@
+;; Compiled using the WebAssembly Tootkit (https://github.com/WebAssembly/wabt)
+;; $ wat2wasm test.wat -o test.wasm
+(module
+ (func $add (export "add") (param $first i32) (param $second i32) (result i32)
+ get_local $first
+ get_local $second
+ (i32.add)
+ )
+ (export "addTwo" (func $add))
+)