summaryrefslogtreecommitdiff
path: root/test/gen-spec-js/basic.txt
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-11-08 12:25:58 -0800
committerBen Smith <binji@chromium.org>2016-12-05 15:41:36 -0800
commit98355e73ef121b8c3e2a0433e31fc8bac7057c70 (patch)
tree55536508a775e31ea652bdf1f780c4a5b7643ba2 /test/gen-spec-js/basic.txt
parent538f5e61d10b19a0d7283e765589432bbeedcfa8 (diff)
downloadwabt-98355e73ef121b8c3e2a0433e31fc8bac7057c70.tar.gz
wabt-98355e73ef121b8c3e2a0433e31fc8bac7057c70.tar.bz2
wabt-98355e73ef121b8c3e2a0433e31fc8bac7057c70.zip
Fix gen-spec-js.py
This now (mostly) matches the output from the spec interpreter.
Diffstat (limited to 'test/gen-spec-js/basic.txt')
-rw-r--r--test/gen-spec-js/basic.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/gen-spec-js/basic.txt b/test/gen-spec-js/basic.txt
new file mode 100644
index 00000000..85d705ca
--- /dev/null
+++ b/test/gen-spec-js/basic.txt
@@ -0,0 +1,12 @@
+;;; TOOL: run-gen-spec-js
+;;; FLAGS: --prefix=%(test_dir)s/gen-spec-empty-prefix.js
+(module
+ (func (export "42") (result i32) i32.const 42))
+
+(assert_return (invoke "42") (i32.const 42))
+(;; STDOUT ;;;
+// A deliberately empty file for testing.
+
+$$ = instance("\x00\x61\x73\x6d\x0d\x00\x00\x00\x01\x05\x01\x60\x00\x01\x7f\x03\x02\x01\x00\x07\x06\x01\x02\x34\x32\x00\x00\x0a\x06\x01\x04\x00\x41\x2a\x0b");
+assert_return(() => $$.exports["42"](), 42);
+;;; STDOUT ;;)