Merge pull request #2116 from jugglinmike/refactor-for-parsers-literals

Refactor literal tests for parsers
This commit is contained in:
Leo Balter 2019-04-02 14:03:25 -04:00 committed by GitHub
commit 7ae3fe3b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 30 additions and 118 deletions

View File

@ -1,19 +0,0 @@
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.8.3-2-s
description: Strict Mode - octal extension (00) is forbidden in strict mode
flags: [onlyStrict]
---*/
var err = null;
try {
eval("var _7_8_3_2 = 00;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_2, "undefined");

View File

@ -4,16 +4,12 @@
/*---
es5id: 7.8.3-6-s
description: Strict Mode - octal extension (000) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var err = null;
$DONOTEVALUATE();
try {
eval("var _7_8_3_6 = 000;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_6, "undefined");
000;

View File

@ -4,16 +4,12 @@
/*---
es5id: 7.8.3-7-s
description: Strict Mode - octal extension (005) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var err = null;
$DONOTEVALUATE();
try {
eval("var _7_8_3_7 = 005;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_7, "undefined");
005;

View File

@ -4,16 +4,12 @@
/*---
es5id: 7.8.3-3-s
description: Strict Mode - octal extension (01) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var err = null;
$DONOTEVALUATE();
try {
eval("var _7_8_3_3 = 01;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_3, "undefined");
01;

View File

@ -4,16 +4,12 @@
/*---
es5id: 7.8.3-1-s
description: Strict Mode - octal extension (010) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var err = null;
$DONOTEVALUATE();
try {
eval("var _7_8_3_1 = 010;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_1, "undefined");
010;

View File

@ -4,16 +4,12 @@
/*---
es5id: 7.8.3-4-s
description: Strict Mode - octal extension (06) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var err = null;
$DONOTEVALUATE();
try {
eval("var _7_8_3_4 = 06;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_4, "undefined");
06;

View File

@ -4,16 +4,12 @@
/*---
es5id: 7.8.3-5-s
description: Strict Mode - octal extension (07) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var err = null;
$DONOTEVALUATE();
try {
eval("var _7_8_3_5 = 07;");
} catch (e) {
err = e;
}
assert(err instanceof SyntaxError);
assert.sameValue(typeof _7_8_3_5, "undefined");
07;

View File

@ -1,15 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: "RegularExpressionFlags :: IdentifierPart"
es5id: 7.8.5_A3.1_T7
description: "IdentifierPart :: \\u0067 (g)"
---*/
//CHECK#1
var regexp;
eval("regexp = /(?:)/\u0067");
if (regexp.global !== true) {
$ERROR('#1: var regexp = /(?:)/\\u0067; regexp.global === true. Actual: ' + (regexp.global));
}

View File

@ -1,15 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: "RegularExpressionFlags :: IdentifierPart"
es5id: 7.8.5_A3.1_T8
description: "IdentifierPart :: \\u0069 (i)"
---*/
//CHECK#1
var regexp;
eval("regexp = /(?:)/\u0069");
if (regexp.ignoreCase !== true) {
$ERROR('#1: var regexp = /(?:)/\\u0069; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase));
}

View File

@ -1,15 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: "RegularExpressionFlags :: IdentifierPart"
es5id: 7.8.5_A3.1_T9
description: "IdentifierPart :: \\u006D (m)"
---*/
//CHECK#1
var regexp;
eval("regexp = /(?:)/\u006D");
if (regexp.multiline !== true) {
$ERROR('#1: var regexp = /(?:)/\\u006D; regexp.multiline === true. Actual: ' + (regexp.multiline));
}