-
Notifications
You must be signed in to change notification settings - Fork 788
Finish updating testsuite #2001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| ;;; TOOL: run-interp-spec | ||
| ;;; STDIN_FILE: third_party/testsuite/tokens.wast | ||
| (;; STDOUT ;;; | ||
| out/test/spec/tokens.wast:74: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.17.wat:1:41: error: unexpected token "0$l", expected a var (e.g. 12 or $foo). | ||
| (func (block $l (i32.const 0) (br_table 0$l))) | ||
| ^^^ | ||
| out/test/spec/tokens.wast:84: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.19.wat:1:41: error: undefined label variable "$l0" | ||
| (func (block $l (i32.const 0) (br_table $l0))) | ||
| ^^^ | ||
| out/test/spec/tokens.wast:94: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.21.wat:1:41: error: undefined label variable "$l$l" | ||
| (func (block $l (i32.const 0) (br_table $l$l))) | ||
| ^^^^ | ||
| out/test/spec/tokens.wast:114: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.25.wat:1:2: error: unexpected token "data"a"", expected a module field or a module. | ||
| (data"a") | ||
| ^^^^^^^ | ||
| out/test/spec/tokens/tokens.25.wat:1:9: error: unexpected token ), expected EOF. | ||
| (data"a") | ||
| ^ | ||
| out/test/spec/tokens.wast:124: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.27.wat:1:7: error: unexpected token $l"a", expected ). | ||
| (data $l"a") | ||
| ^^^^^ | ||
| out/test/spec/tokens.wast:134: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.29.wat:1:7: error: unexpected token $l" a", expected ). | ||
| (data $l" a") | ||
| ^^^^^^ | ||
| out/test/spec/tokens.wast:144: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.31.wat:1:7: error: unexpected token $l"a ", expected ). | ||
| (data $l"a ") | ||
| ^^^^^^ | ||
| out/test/spec/tokens.wast:154: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.33.wat:1:7: error: unexpected token $l"a ""b", expected ). | ||
| (data $l"a ""b") | ||
| ^^^^^^^^^ | ||
| out/test/spec/tokens.wast:164: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.35.wat:1:7: error: unexpected token $l"", expected ). | ||
| (data $l"") | ||
| ^^^^^^^^^^ | ||
| out/test/spec/tokens.wast:174: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.37.wat:1:7: error: unexpected token $l" ", expected ). | ||
| (data $l" ") | ||
| ^^^^^^^^^^^ | ||
| out/test/spec/tokens.wast:184: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.39.wat:1:7: error: unexpected token $l" ", expected ). | ||
| (data $l" ") | ||
| ^^^^^^^^^^^ | ||
| out/test/spec/tokens.wast:194: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.41.wat:1:7: error: invalid string token | ||
| (data "a""b") | ||
| ^^^ | ||
| out/test/spec/tokens/tokens.41.wat:1:7: error: unexpected token Invalid, expected ). | ||
| (data "a""b") | ||
| ^^^ | ||
| out/test/spec/tokens.wast:204: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.43.wat:1:7: error: invalid string token | ||
| (data "a"" b") | ||
| ^^^ | ||
| out/test/spec/tokens/tokens.43.wat:1:7: error: unexpected token Invalid, expected ). | ||
| (data "a"" b") | ||
| ^^^ | ||
| out/test/spec/tokens.wast:214: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.45.wat:1:7: error: invalid string token | ||
| (data "a ""b") | ||
| ^^^^ | ||
| out/test/spec/tokens/tokens.45.wat:1:7: error: unexpected token Invalid, expected ). | ||
| (data "a ""b") | ||
| ^^^^ | ||
| out/test/spec/tokens.wast:224: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.47.wat:1:7: error: invalid string token | ||
| (data """") | ||
| ^^^^^^^^ | ||
| out/test/spec/tokens/tokens.47.wat:1:7: error: unexpected token Invalid, expected ). | ||
| (data """") | ||
| ^^^^^^^^ | ||
| out/test/spec/tokens.wast:234: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.49.wat:1:7: error: invalid string token | ||
| (data """ ") | ||
| ^^^^^^^^ | ||
| out/test/spec/tokens/tokens.49.wat:1:7: error: unexpected token Invalid, expected ). | ||
| (data """ ") | ||
| ^^^^^^^^ | ||
| out/test/spec/tokens.wast:244: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.51.wat:1:7: error: invalid string token | ||
| (data " """) | ||
| ^^^^^^^^^ | ||
| out/test/spec/tokens/tokens.51.wat:1:7: error: unexpected token Invalid, expected ). | ||
| (data " """) | ||
| ^^^^^^^^^ | ||
| out/test/spec/tokens.wast:252: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.52.wat:1:7: error: unexpected token "a", expected ). | ||
| (func "a"x) | ||
| ^^^ | ||
| out/test/spec/tokens/tokens.52.wat:1:10: error: unexpected token x. | ||
| (func "a"x) | ||
| ^ | ||
| out/test/spec/tokens.wast:258: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.53.wat:1:7: error: unexpected token "a", expected ). | ||
| (func "a"0) | ||
| ^^^ | ||
| out/test/spec/tokens.wast:264: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.54.wat:1:7: error: unexpected token 0"a", expected ). | ||
| (func 0"a") | ||
| ^^^^ | ||
| out/test/spec/tokens.wast:270: assert_malformed passed: | ||
| out/test/spec/tokens/tokens.55.wat:1:7: error: unexpected token "a", expected ). | ||
| (func "a"$x) | ||
| ^^^ | ||
| 56/56 tests passed. | ||
| ;;; STDOUT ;;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ;;; TOOL: run-spec-wasm2c | ||
| ;;; STDIN_FILE: third_party/testsuite/tokens.wast | ||
| (;; STDOUT ;;; | ||
| 0/0 tests passed. | ||
| ;;; STDOUT ;;) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the change in tokenization, ReadReservedChars() now needs to be able to call GetStringToken() if it sees a
"character, but GetStringToken takes aWastParsernamedparserso it can call the ERROR macro, and ReadReservedChars() is called in a whole bunch of places and takes no arguments. So... this makes it possible for ReadReservedChars() to callGetStringToken(nullptr)without causing a crash if that wants to log an error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But won't this mean that such errors can/will be lost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, now that strings can be part of a
reservedtoken, we would lose the log message if an invalid string is found while running NoTrailingReservedChars(). I think the best/cleanest fix for this is #2013, which just makes the WastLexer work similar to a WastParser (it receives an Errors* on construction and stores it so it can log errors from any context).