v8/test/message
Tobias Tebbi d3ba88a2ce [builtins] catch and rethrow the message together with the exception
This aligns the Torque semantics of catch with the JavaScript behavior:
When we catch an exception, we also reset the pending exception.
This also fixes a long-standing bug that we didn't restore the original
pending message after executing arbitrary JS in IteratorCloseOnException

Bug: v8:12439
Change-Id: I268d9d639d09023a424f352547cdce03428f983a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303805
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78259}
2021-12-06 22:14:56 +00:00
..
fail [builtins] catch and rethrow the message together with the exception 2021-12-06 22:14:56 +00:00
mjsunit [parser] Only post tasks when there is no error 2021-11-05 11:06:18 +00:00
regress/fail [runtime] Ensure JSMessageObject has source positions 2021-11-12 17:43:31 +00:00
asm-assignment-undeclared.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-assignment-undeclared.out [asm.js] Fix assignment with undeclared target. 2017-03-30 08:36:17 +00:00
asm-function-mismatch-def.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-mismatch-def.out [asm.js] Test and fix function type checking. 2017-04-07 12:10:45 +00:00
asm-function-mismatch-use.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-mismatch-use.out [asm.js] Test and fix function type checking. 2017-04-07 12:10:45 +00:00
asm-function-redefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-redefined.out [asm.js] Test and fix function name collisions. 2017-04-07 09:03:11 +00:00
asm-function-undefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-undefined.out [asm.js] Fix handling of bogus code after export statement. 2019-02-21 14:37:37 +00:00
asm-function-variable-collision.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-function-variable-collision.out [asm.js] Test and fix function name collisions. 2017-04-07 09:03:11 +00:00
asm-import-wrong-annotation.js [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-import-wrong-annotation.out [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-import-wrong-object.js [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-import-wrong-object.out [asm.js] Fix validation failure in module variable import. 2017-05-05 11:39:06 +00:00
asm-linking-bogus-heap.js [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-bogus-heap.out Reland "[asmjs] Properly validate asm.js heap sizes" 2018-08-21 09:00:04 +00:00
asm-linking-bogus-stdlib.js [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-bogus-stdlib.out [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-missing-heap.js [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-linking-missing-heap.out [asm.js] Report module linking failures to the console. 2017-05-19 11:31:12 +00:00
asm-missing-parameter-annotation.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-missing-parameter-annotation.out [asm.js] Make validation error messages consistent. 2017-03-29 20:55:12 +00:00
asm-missing-return-annotation.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-missing-return-annotation.out [asm.js] Make validation error messages consistent. 2017-03-29 20:55:12 +00:00
asm-table-mismatch-def.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-mismatch-def.out [asm.js] Test and fix function table type checks. 2017-04-10 08:47:34 +00:00
asm-table-mismatch-use.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-mismatch-use.out [asm.js] Test and fix function table type checks. 2017-04-10 08:47:34 +00:00
asm-table-redefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-redefined.out [asm.js] Test and fix function table definition failures. 2017-04-11 16:46:26 +00:00
asm-table-undefined.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-undefined.out [asm.js] Fix handling of bogus code after export statement. 2019-02-21 14:37:37 +00:00
asm-table-variable-collision.js [asm.js] Remove deprecated --fast-validate-asm flag. 2017-05-04 13:52:39 +00:00
asm-table-variable-collision.out [asm.js] Test and fix function table definition failures. 2017-04-11 16:46:26 +00:00
BUILD.gn [build] Add data deps for d8 test suites 2018-03-26 13:44:58 +00:00
empty.js [platform] Allow to memory-map empty files 2019-01-21 16:02:47 +00:00
empty.out [platform] Allow to memory-map empty files 2019-01-21 16:02:47 +00:00
message.status Skip {map,set}-grow-failed tests on TSAN 2021-09-27 20:32:29 +00:00
non-use-strict-hex-escape.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-hex-escape.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-octal-escape.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-octal-escape.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-uhex-escape.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
non-use-strict-uhex-escape.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-arguments.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-arguments.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-eval.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-eval.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-with.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
nonstrict-with.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
object-binding-pattern-await-computed-name.js [parser] classify binding pattern errors when parsing await expression 2017-12-09 16:29:23 +00:00
object-binding-pattern-await-computed-name.out [parser] classify binding pattern errors when parsing await expression 2017-12-09 16:29:23 +00:00
README.md Remove always-true --harmony-function-tostring runtime flag 2018-10-03 15:04:16 +00:00
strict-octal-indirect-regexp.js [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
strict-octal-indirect-regexp.out [testing] Move the last JS tests out of "preparser". 2016-03-14 17:10:49 +00:00
strict-octal-regexp.js [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
strict-octal-regexp.out [testing] Convert some "preparser" tests into "message". 2016-03-11 11:00:12 +00:00
testcfg.py [message] Have message testcfg extend ExpectedOutProc 2021-04-22 18:43:28 +00:00
try-catch-finally-no-message.js
try-catch-finally-no-message.out
try-catch-finally-return-in-finally.js
try-catch-finally-return-in-finally.out
try-finally-return-in-finally.js
try-finally-return-in-finally.out
wasm-finish-compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-finish-compilation.out Reland "Reland "[d8][wasm] Test wasm compilation completion"" 2018-04-10 08:24:27 +00:00
wasm-function-name-async.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-function-name-async.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-function-name-streaming.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-function-name-streaming.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-module-and-function-name-async.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-module-and-function-name-async.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-module-and-function-name-streaming.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-module-and-function-name-streaming.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-module-name-async.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-module-name-async.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-module-name-streaming.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-module-name-streaming.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-no-name-async.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-no-name-async.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-no-name-streaming.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-no-name-streaming.out [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
wasm-trace-liftoff.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-trace-liftoff.out [wasm] Fix register uses in wasm tracing 2020-06-15 11:13:18 +00:00
wasm-trace-memory-liftoff.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-trace-memory-liftoff.out [wasm] Change trace memory instr offset to be relative to module 2021-04-21 20:01:50 +00:00
wasm-trace-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-trace-memory.out [wasm] Change trace memory instr offset to be relative to module 2021-04-21 20:01:50 +00:00
wasm-trace-turbofan.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-trace-turbofan.out [wasm] Fix register uses in wasm tracing 2020-06-15 11:13:18 +00:00
weakref-finalizationregistry-error.js [weakrefs] Remove --no-harmony-weak-refs flag 2021-04-08 23:10:53 +00:00
weakref-finalizationregistry-error.out [weakrefs] Port FinalizationRegistry cleanup loop to Torque 2020-04-16 03:31:04 +00:00

JavaScript tests with expected output

Tests in test/message pass if the output matches the expected output. Message tests are particularly useful when checking for exact error messages.

Tests and their expected output must have the same filename, with the .js and .out extension.

foo.js
foo.out

All tests must end with an exception. The test runner does not handle output from multiple runs, e.g., --stress-opt. Without an exception, the output will be generated several times and the comparison will fail.

You can use a regex in the expected output instead of the exact path:

*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'

Empty lines are ignored in the comparison, but whitespaces are not.

Exact details of the test runner are in testcfg.py.