diff options
author | Ben Smith <binjimin@gmail.com> | 2017-06-11 18:35:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 18:35:43 -0700 |
commit | 3377747c3fb159826c5bd6d4a70ee5e167c79552 (patch) | |
tree | ce5f7989c14c017f24dc8c7b0233881b0fca78a8 /test/spec/align.txt | |
parent | 3b81354b2482930a311646c34863ef5a584e7b2c (diff) | |
download | wabt-3377747c3fb159826c5bd6d4a70ee5e167c79552.tar.gz wabt-3377747c3fb159826c5bd6d4a70ee5e167c79552.tar.bz2 wabt-3377747c3fb159826c5bd6d4a70ee5e167c79552.zip |
Update testsuite; more lexer/parser changes (#484)
* Add support for quoted modules: `(module quote "...")`
* Binary modules must be annotated: `(module binary "...")`
* Multiple result blocks are no longer a parser error:
`(func (result i32) (result i32) ...)`
* Function types can specify unused bind variables:
`(type (func (param $foo)))`
* Rename `RawModule` -> `ScriptModule`. This encapsulates a module that
may not be parsed yet, whether binary or "quoted".
* Validate load/store offsets and alignment in the parser, not in the
validator. The spec tests assume that you can catch these errors with
`assert_malformed`.
* Parse wast files in `wasm-interp` when checking malformed/invalid/etc.
modules. This allows us to run all assertions at the same time, which
is nice. `wasm-interp` should probably be renamed, though.
* Two tests in `type.wast` fail because they use:
`(assert_invalid (module quote "..."))`. I'd prefer that we don't
support this, since it's unnecessary, and additional work. I'll fix in
a follow-up CL if we decide this is worth keeping.
Diffstat (limited to 'test/spec/align.txt')
-rw-r--r-- | test/spec/align.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/spec/align.txt b/test/spec/align.txt new file mode 100644 index 00000000..c5265883 --- /dev/null +++ b/test/spec/align.txt @@ -0,0 +1,27 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/align.wast +(;; STDOUT ;;; +out/third_party/testsuite/align.wast:2: assert_malformed passed: + out/third_party/testsuite/align/align.0.wast:1:42: alignment must be power-of-two + (module (memory 0) (func (drop (i64.load align=0 (i32.const 0))))) + ^^^^^^^ +out/third_party/testsuite/align.wast:8: assert_malformed passed: + out/third_party/testsuite/align/align.1.wast:1:42: alignment must be power-of-two + (module (memory 0) (func (drop (i64.load align=7 (i32.const 0))))) + ^^^^^^^ +out/third_party/testsuite/align.wast:14: assert_invalid passed: + error: alignment must not be larger than natural alignment (8) + error: @0x00000021: OnLoadExpr callback failed +out/third_party/testsuite/align.wast:19: assert_malformed passed: + out/third_party/testsuite/align/align.3.wast:1:37: alignment must be power-of-two + (module (memory 0) (func (i64.store align=0 (i32.const 0) (i64.const 0)))) + ^^^^^^^ +out/third_party/testsuite/align.wast:25: assert_malformed passed: + out/third_party/testsuite/align/align.4.wast:1:37: alignment must be power-of-two + (module (memory 0) (func (i64.store align=5 (i32.const 0) (i64.const 0)))) + ^^^^^^^ +out/third_party/testsuite/align.wast:31: assert_invalid passed: + error: alignment must not be larger than natural alignment (8) + error: @0x00000023: OnStoreExpr callback failed +6/6 tests passed. +;;; STDOUT ;;) |