diff options
author | Mike Pennisi <mike@mikepennisi.com> | 2017-12-03 00:06:42 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2018-01-05 15:17:50 -0500 |
commit | 136110378bb62fefb5a9a69080067e6f126f9dae (patch) | |
tree | 90b8d7ba0f9f1162b2edd0e74afb87382fc6f195 /tools | |
parent | 66df349af32c3f293936f7a947ac18bfb1ecda5c (diff) |
Rename negative test "phase" for parsing
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.
Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lint/lib/checks/negative.py | 2 | ||||
-rw-r--r-- | tools/lint/test/fixtures/negative_parse_throw_bad_value.js (renamed from tools/lint/test/fixtures/negative_early_throw_bad_value.js) | 2 | ||||
-rw-r--r-- | tools/lint/test/fixtures/negative_parse_throw_missing.js (renamed from tools/lint/test/fixtures/negative_early_throw_missing.js) | 2 | ||||
-rw-r--r-- | tools/lint/test/fixtures/negative_valid_parse.js (renamed from tools/lint/test/fixtures/negative_valid_early.js) | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tools/lint/lib/checks/negative.py b/tools/lint/lib/checks/negative.py index b1ae3e4fb..aa9ec1e40 100644 --- a/tools/lint/lib/checks/negative.py +++ b/tools/lint/lib/checks/negative.py @@ -23,5 +23,5 @@ class CheckNegative(Check): if not 'phase' in negative: return '"negative" must specify a "phase" field' - if negative["phase"] == "early" and not _THROW_STMT.search(source): + if negative["phase"] == "parse" and not _THROW_STMT.search(source): return 'Negative tests of type "early" must include a `throw` statement' diff --git a/tools/lint/test/fixtures/negative_early_throw_bad_value.js b/tools/lint/test/fixtures/negative_parse_throw_bad_value.js index 22979c313..2e9510183 100644 --- a/tools/lint/test/fixtures/negative_early_throw_bad_value.js +++ b/tools/lint/test/fixtures/negative_parse_throw_bad_value.js @@ -7,7 +7,7 @@ esid: sec-assignment-operators-static-semantics-early-errors description: Minimal test negative: type: SyntaxError - phase: early + phase: parse ---*/ throw "Test262: This statement should not be evaluated!"; diff --git a/tools/lint/test/fixtures/negative_early_throw_missing.js b/tools/lint/test/fixtures/negative_parse_throw_missing.js index 44a9a22dd..fd7f812f1 100644 --- a/tools/lint/test/fixtures/negative_early_throw_missing.js +++ b/tools/lint/test/fixtures/negative_parse_throw_missing.js @@ -7,7 +7,7 @@ esid: sec-assignment-operators-static-semantics-early-errors description: Minimal test negative: type: SyntaxError - phase: early + phase: parse ---*/ !!! diff --git a/tools/lint/test/fixtures/negative_valid_early.js b/tools/lint/test/fixtures/negative_valid_parse.js index 5b6c7a261..f3fd0a55f 100644 --- a/tools/lint/test/fixtures/negative_valid_early.js +++ b/tools/lint/test/fixtures/negative_valid_parse.js @@ -6,7 +6,7 @@ esid: sec-assignment-operators-static-semantics-early-errors description: Minimal test negative: type: SyntaxError - phase: early + phase: parse ---*/ throw "Test262: This statement should not be evaluated."; |