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/gen-spec-js.py | |
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/gen-spec-js.py')
-rwxr-xr-x | test/gen-spec-js.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/gen-spec-js.py b/test/gen-spec-js.py index 11372abd..5b7df621 100755 --- a/test/gen-spec-js.py +++ b/test/gen-spec-js.py @@ -422,8 +422,10 @@ class JSWriter(object): command.get('name', '$$'))) def _WriteAssertModuleCommand(self, command): - self.out_file.write('%s("%s");\n' % (command['type'], - self._Module(command['filename']))) + # Don't bother writing out text modules; they can't be parsed by JS. + if command['module_type'] == 'binary': + self.out_file.write('%s("%s");\n' % (command['type'], + self._Module(command['filename']))) def _WriteAssertReturnCommand(self, command): expected = command['expected'] |