diff options
Diffstat (limited to 'test/parse/module')
-rw-r--r-- | test/parse/module/bad-binary-module-magic.txt | 9 | ||||
-rw-r--r-- | test/parse/module/binary-module.txt | 16 | ||||
-rw-r--r-- | test/parse/module/memory-segment-multi-string.txt | 3 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/parse/module/bad-binary-module-magic.txt b/test/parse/module/bad-binary-module-magic.txt new file mode 100644 index 00000000..9f8c7e7c --- /dev/null +++ b/test/parse/module/bad-binary-module-magic.txt @@ -0,0 +1,9 @@ +;;; ERROR: 1 +(module + "\00ASM" + "\0b\00\00\00") +(;; STDERR ;;; +parse/module/bad-binary-module-magic.txt:3:3: error in binary module: @0x00000004: magic value mismatch + "\00ASM" + ^^^^^^^^ +;;; STDERR ;;) diff --git a/test/parse/module/binary-module.txt b/test/parse/module/binary-module.txt new file mode 100644 index 00000000..578f1930 --- /dev/null +++ b/test/parse/module/binary-module.txt @@ -0,0 +1,16 @@ +(module + "\00asm" ;; magic + "\0b\00\00\00" ;; version + "\04type\05" ;; "type" section, 5 bytes + "\01\40\00\01\01" ;; 1 type, function, no params, i32 result + "\08function\02" ;; "function" section, 2 bytes + "\01\00" ;; 1 function, type 0 + "\06export\07" ;; "export" section, 7 bytes + "\01\00\04main" ;; 1 export, function 0, named "main" + "\04code\08" ;; "code" section, 8 bytes + "\01" ;; 1 function + "\06\00" ;; 0 locals + "\10" ;; i32.const + "\dc\7c" ;; -420 + "\09\01" ;; return arity 1 +) diff --git a/test/parse/module/memory-segment-multi-string.txt b/test/parse/module/memory-segment-multi-string.txt new file mode 100644 index 00000000..51503ee4 --- /dev/null +++ b/test/parse/module/memory-segment-multi-string.txt @@ -0,0 +1,3 @@ +(module + (memory 1 + (segment 0 "hi" "there" "how" "are" "you"))) |