diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/binary/bad-block-end.txt | 22 | ||||
-rwxr-xr-x | test/gen-wasm.py | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/test/binary/bad-block-end.txt b/test/binary/bad-block-end.txt new file mode 100644 index 00000000..36f9a655 --- /dev/null +++ b/test/binary/bad-block-end.txt @@ -0,0 +1,22 @@ +;;; ERROR: 1 +;;; TOOL: run-gen-wasm +magic +version +section("type") { count[1] function params[0] results[0] } +section("function") { count[1] type[0] } +section("code") { + count[1] + func { + locals[0] + nop + block + br arity[1] depth[0] ;; bad arity, can't pop past block + end + } +} +(;; STDERR ;;; +Error running "wasm-wast": +error: popping past block label +error: @0x0000002c: on_br_expr callback failed + +;;; STDERR ;;) diff --git a/test/gen-wasm.py b/test/gen-wasm.py index b843dbd6..e0201e0c 100755 --- a/test/gen-wasm.py +++ b/test/gen-wasm.py @@ -256,7 +256,7 @@ t_RBRACKET = r'\]' t_ignore = ' \t' def t_COMMENT(t): - r'\#.*' + r';;.*' pass def t_INT(t): |