diff options
author | Ben Smith <binjimin@gmail.com> | 2017-10-30 11:17:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 11:17:04 -0700 |
commit | fa0f11e9f54a8c8f4d7f0a5d2cd1cf113f30f461 (patch) | |
tree | b0ac7297f6df3998586c0e6849c65bf1341a38c4 /test/spec/loop.txt | |
parent | b230d2f7d23d1c03aa4acf5f7de11e3865bb3727 (diff) | |
download | wabt-fa0f11e9f54a8c8f4d7f0a5d2cd1cf113f30f461.tar.gz wabt-fa0f11e9f54a8c8f4d7f0a5d2cd1cf113f30f461.tar.bz2 wabt-fa0f11e9f54a8c8f4d7f0a5d2cd1cf113f30f461.zip |
Better type-checking errors (#662)
Instead of printing errors on every failure, accumulate errors for each
operation. If any fails, then print a message. It changes errors such
as:
```
error: type mismatch in i64.store, expected i32 but got f32.
error: type mismatch in i64.store, expected i64 but got i32.
```
to:
```
error: type mismatch in i64.store, expected [i32, i64] but got [f32, i32]
```
Diffstat (limited to 'test/spec/loop.txt')
-rw-r--r-- | test/spec/loop.txt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/spec/loop.txt b/test/spec/loop.txt index 8a64d479..fa4371f6 100644 --- a/test/spec/loop.txt +++ b/test/spec/loop.txt @@ -2,31 +2,31 @@ ;;; STDIN_FILE: third_party/testsuite/loop.wast (;; STDOUT ;;; out/third_party/testsuite/loop.wast:254: assert_invalid passed: - error: type stack size too small at implicit return. got 0, expected at least 1 + error: type mismatch in implicit return, expected [i32] but got [] 000001c: error: EndFunctionBody callback failed out/third_party/testsuite/loop.wast:258: assert_invalid passed: - error: type stack size too small at implicit return. got 0, expected at least 1 + error: type mismatch in implicit return, expected [i64] but got [] 000001c: error: EndFunctionBody callback failed out/third_party/testsuite/loop.wast:262: assert_invalid passed: - error: type stack size too small at implicit return. got 0, expected at least 1 + error: type mismatch in implicit return, expected [f32] but got [] 000001c: error: EndFunctionBody callback failed out/third_party/testsuite/loop.wast:266: assert_invalid passed: - error: type stack size too small at implicit return. got 0, expected at least 1 + error: type mismatch in implicit return, expected [f64] but got [] 000001c: error: EndFunctionBody callback failed out/third_party/testsuite/loop.wast:271: assert_invalid passed: - error: type stack at end of loop is 1, expected 0 + error: type mismatch in loop, expected [] but got [i32] 000001c: error: OnEndExpr callback failed out/third_party/testsuite/loop.wast:277: assert_invalid passed: - error: type stack size too small at loop. got 0, expected at least 1 + error: type mismatch in loop, expected [i32] but got [] 000001b: error: OnEndExpr callback failed out/third_party/testsuite/loop.wast:283: assert_invalid passed: - error: type stack size too small at loop. got 0, expected at least 1 + error: type mismatch in loop, expected [i32] but got [] 000001c: error: OnEndExpr callback failed out/third_party/testsuite/loop.wast:289: assert_invalid passed: - error: type mismatch in loop, expected i32 but got f32. + error: type mismatch in loop, expected [i32] but got [f32] 0000020: error: OnEndExpr callback failed out/third_party/testsuite/loop.wast:295: assert_invalid passed: - error: type mismatch in implicit return, expected i32 but got i64. + error: type mismatch in implicit return, expected [i32] but got [i64] 0000020: error: EndFunctionBody callback failed out/third_party/testsuite/loop.wast:303: assert_malformed passed: out/third_party/testsuite/loop/loop.10.wast:1:16: error: unexpected label "$l" |