diff options
author | Mike Pennisi <mike@mikepennisi.com> | 2017-12-03 00:20:06 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2018-01-05 15:17:51 -0500 |
commit | e6d674ef7ae0f0d82875a2abafbaf0c63db7cef1 (patch) | |
tree | f78f0176aa79c50f225fd77c59431e0c692e0301 /tools | |
parent | 136110378bb62fefb5a9a69080067e6f126f9dae (diff) | |
download | qtdeclarative-testsuites-e6d674ef7ae0f0d82875a2abafbaf0c63db7cef1.tar.gz |
Rename negative test "phase" for module resolution
Diffstat (limited to 'tools')
4 files changed, 46 insertions, 1 deletions
diff --git a/tools/lint/lib/checks/negative.py b/tools/lint/lib/checks/negative.py index aa9ec1e40..666cde76e 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"] == "parse" and not _THROW_STMT.search(source): + if negative["phase"] in ["parse", "resolution"] 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_resolution_throw_bad_value.js b/tools/lint/test/fixtures/negative_resolution_throw_bad_value.js new file mode 100644 index 000000000..daf09d5e8 --- /dev/null +++ b/tools/lint/test/fixtures/negative_resolution_throw_bad_value.js @@ -0,0 +1,16 @@ +NEGATIVE +^ expected errors | v input +// Copyright (C) 2017 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +description: Minimal test +flags: [module] +negative: + type: SyntaxError + phase: resolution +---*/ + +throw "Test262: This statement should not be evaluated!"; + +import 'non-existent-module.js'; diff --git a/tools/lint/test/fixtures/negative_resolution_throw_missing.js b/tools/lint/test/fixtures/negative_resolution_throw_missing.js new file mode 100644 index 000000000..8892676e2 --- /dev/null +++ b/tools/lint/test/fixtures/negative_resolution_throw_missing.js @@ -0,0 +1,14 @@ +NEGATIVE +^ expected errors | v input +// Copyright (C) 2017 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +description: Minimal test +flags: [module] +negative: + type: SyntaxError + phase: resolution +---*/ + +import 'non-existent-module.js'; diff --git a/tools/lint/test/fixtures/negative_valid_resolution.js b/tools/lint/test/fixtures/negative_valid_resolution.js new file mode 100644 index 000000000..b3068c7fe --- /dev/null +++ b/tools/lint/test/fixtures/negative_valid_resolution.js @@ -0,0 +1,15 @@ +^ expected errors | v input +// Copyright (C) 2017 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +description: Minimal test +flags: [module] +negative: + type: SyntaxError + phase: resolution +---*/ + +throw "Test262: This statement should not be evaluated."; + +import 'non-existent-module.js'; |