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/traps.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/traps.txt')
-rw-r--r-- | test/spec/traps.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/spec/traps.txt b/test/spec/traps.txt index b1b5e4eb..f6b9d6d4 100644 --- a/test/spec/traps.txt +++ b/test/spec/traps.txt @@ -19,19 +19,19 @@ out/test/spec/traps.wast:54: assert_trap passed: invalid conversion to integer out/test/spec/traps.wast:55: assert_trap passed: invalid conversion to integer out/test/spec/traps.wast:56: assert_trap passed: invalid conversion to integer out/test/spec/traps.wast:57: assert_trap passed: invalid conversion to integer -out/test/spec/traps.wast:78: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:79: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:80: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:81: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:82: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:83: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:84: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:85: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:86: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:87: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:88: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:89: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:90: assert_trap passed: out of bounds memory access -out/test/spec/traps.wast:91: assert_trap passed: out of bounds memory access +out/test/spec/traps.wast:78: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536 +out/test/spec/traps.wast:79: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536 +out/test/spec/traps.wast:80: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536 +out/test/spec/traps.wast:81: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536 +out/test/spec/traps.wast:82: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536 +out/test/spec/traps.wast:83: assert_trap passed: out of bounds memory access: access at 65536+8 >= max value 65536 +out/test/spec/traps.wast:84: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536 +out/test/spec/traps.wast:85: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536 +out/test/spec/traps.wast:86: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536 +out/test/spec/traps.wast:87: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536 +out/test/spec/traps.wast:88: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536 +out/test/spec/traps.wast:89: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536 +out/test/spec/traps.wast:90: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536 +out/test/spec/traps.wast:91: assert_trap passed: out of bounds memory access: access at 65536+8 >= max value 65536 32/32 tests passed. ;;; STDOUT ;;) |