mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 13:04:39 +02:00
Refactor string literal test for parsers
Thsi test for the parsing of string literals was expressed using `eval`. This made the test more complex than necessary and also prevented the test from providing value to ECMAScript parsers. Remove the use of `eval` and instead express the expectation with literal source text.
This commit is contained in:
parent
4f1e628107
commit
ccaa9571ea
@ -6,9 +6,14 @@ es5id: 7.8.4-1-s
|
|||||||
description: >
|
description: >
|
||||||
A directive preceeding an 'use strict' directive may not contain
|
A directive preceeding an 'use strict' directive may not contain
|
||||||
an OctalEscapeSequence
|
an OctalEscapeSequence
|
||||||
|
negative:
|
||||||
|
phase: parse
|
||||||
|
type: SyntaxError
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
throw "Test262: This statement should not be evaluated.";
|
||||||
assert.throws(SyntaxError, function() {
|
|
||||||
eval(' "asterisk: \\052" /* octal escape sequences forbidden in strict mode*/ ; "use strict";');
|
(function() {
|
||||||
|
"asterisk: \052";
|
||||||
|
"use strict";
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user