v8/test/message
Kotaro Ohsugi 9b07049cd8 Resolved an issue where an earlier error was not reported first in certain cases
Previously, once after an error was reported, following errors were ignored
even if they had occured in prior lines. Strict octal error and conflicting
variable declarations error could be missed under this implementation.
This patch solves this problem by making an error replaceable.

Bug: v8:13187
Change-Id: I8295baf0db757a5c1b504920cb274cdee78f5055
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4019398
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84212}
2022-11-11 13:43:32 +00:00
..
fail Resolved an issue where an earlier error was not reported first in certain cases 2022-11-11 13:43:32 +00:00
mjsunit [test] Pretty print object properties on assert failure 2022-03-04 14:30:51 +00:00
regress/fail [runtime] Ensure JSMessageObject has source positions 2021-11-12 17:43:31 +00:00
asm-assignment-undeclared.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-assignment-undeclared.out
asm-function-mismatch-def.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-function-mismatch-def.out
asm-function-mismatch-use.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-function-mismatch-use.out
asm-function-redefined.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-function-redefined.out
asm-function-undefined.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-function-undefined.out
asm-function-variable-collision.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-function-variable-collision.out
asm-import-wrong-annotation.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-import-wrong-annotation.out
asm-import-wrong-object.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-import-wrong-object.out
asm-linking-bogus-heap.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-linking-bogus-heap.out
asm-linking-bogus-stdlib.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-linking-bogus-stdlib.out
asm-linking-missing-heap.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-linking-missing-heap.out
asm-missing-parameter-annotation.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-missing-parameter-annotation.out
asm-missing-return-annotation.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-missing-return-annotation.out
asm-table-mismatch-def.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-table-mismatch-def.out
asm-table-mismatch-use.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-table-mismatch-use.out
asm-table-redefined.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-table-redefined.out
asm-table-undefined.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-table-undefined.out
asm-table-variable-collision.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
asm-table-variable-collision.out
BUILD.gn
empty.js
empty.out
message.status [mips32] Delete mips32 from v8 2022-09-13 07:54:54 +00:00
non-use-strict-hex-escape.js
non-use-strict-hex-escape.out
non-use-strict-octal-escape.js
non-use-strict-octal-escape.out
non-use-strict-uhex-escape.js
non-use-strict-uhex-escape.out
nonstrict-arguments.js
nonstrict-arguments.out
nonstrict-eval.js
nonstrict-eval.out
nonstrict-with.js
nonstrict-with.out
object-binding-pattern-await-computed-name.js
object-binding-pattern-await-computed-name.out
README.md [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
strict-octal-indirect-regexp.js
strict-octal-indirect-regexp.out
strict-octal-regexp.js
strict-octal-regexp.out
testcfg.py [cleanup] Remove --stress-opt 2022-08-25 12:26:24 +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
unicode-filename-🎅🎄.js [d8] Add unicode filename support on windows 2022-04-07 11:40:34 +00:00
unicode-filename-🎅🎄.out [d8] Add unicode filename support on windows 2022-04-07 11:40:34 +00:00
wasm-finish-compilation.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
wasm-finish-compilation.out
wasm-function-name-async.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
wasm-trace-liftoff.out
wasm-trace-memory-liftoff.js [cleanup] Remove Wasm SIMD flag & deprecate embedder-enabling API 2022-10-22 00:47:42 +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 [cleanup] Remove Wasm SIMD flag & deprecate embedder-enabling API 2022-10-22 00:47:42 +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 [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
wasm-trace-turbofan.out
weakref-finalizationregistry-error.js [test] Automatically add --no-stress-opt to message tests 2022-02-18 08:51:12 +00:00
weakref-finalizationregistry-error.out

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

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.