diff options
author | Sam Clegg <sbc@chromium.org> | 2019-11-19 14:46:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 14:46:02 -0800 |
commit | 3eb3daf7af8714fe274b578fe9c289cd00d97872 (patch) | |
tree | 62aa451d7fb8d6d931289049f8fcd7a432a410a2 /test/spec/memory_grow.txt | |
parent | b51f2cd46959467c8e3bb567799f400dbf8070e7 (diff) | |
download | wabt-3eb3daf7af8714fe274b578fe9c289cd00d97872.tar.gz wabt-3eb3daf7af8714fe274b578fe9c289cd00d97872.tar.bz2 wabt-3eb3daf7af8714fe274b578fe9c289cd00d97872.zip |
interpreter: Allow traps to include custom error strings (#1236)
This means we can give more precise/useful errors for runtime failures.
Change interp::Result from an enum to struct so it can hold the
result enum plus an optional detailed error message.
Add TRAP_MSG and TRAP_IF_MSG macros that work just like TRAP and
TRAP_IF but contain a format string and printf-like arguments which
are formatted to produce the error message.
Diffstat (limited to 'test/spec/memory_grow.txt')
-rw-r--r-- | test/spec/memory_grow.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/spec/memory_grow.txt b/test/spec/memory_grow.txt index 9b82f405..3ccfab73 100644 --- a/test/spec/memory_grow.txt +++ b/test/spec/memory_grow.txt @@ -1,12 +1,12 @@ ;;; TOOL: run-interp-spec ;;; STDIN_FILE: third_party/testsuite/memory_grow.wast (;; STDOUT ;;; -out/test/spec/memory_grow.wast:15: assert_trap passed: out of bounds memory access -out/test/spec/memory_grow.wast:16: assert_trap passed: out of bounds memory access -out/test/spec/memory_grow.wast:17: assert_trap passed: out of bounds memory access -out/test/spec/memory_grow.wast:18: assert_trap passed: out of bounds memory access -out/test/spec/memory_grow.wast:24: assert_trap passed: out of bounds memory access -out/test/spec/memory_grow.wast:25: assert_trap passed: out of bounds memory access +out/test/spec/memory_grow.wast:15: assert_trap passed: out of bounds memory access: access at 0+4 >= max value 0 +out/test/spec/memory_grow.wast:16: assert_trap passed: out of bounds memory access: access at 0+4 >= max value 0 +out/test/spec/memory_grow.wast:17: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 0 +out/test/spec/memory_grow.wast:18: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 0 +out/test/spec/memory_grow.wast:24: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536 +out/test/spec/memory_grow.wast:25: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536 out/test/spec/memory_grow.wast:286: assert_trap passed: undefined table index out/test/spec/memory_grow.wast:313: assert_invalid passed: error: type mismatch in memory.grow, expected [i32] but got [] |