mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Support not-NotEarlyError as well.
This commit is contained in:
parent
515ed58d60
commit
352d86b8ed
@ -23,7 +23,9 @@
|
||||
//An exception is expected
|
||||
if (testDescrip.negative !== undefined) {
|
||||
//TODO - come up with a generic way of catching the error type from window.onerror
|
||||
testDescrip.negative = testDescrip.negative === "NotEarlyError" ? testDescrip.negative : ".";
|
||||
testDescrip.negative = testDescrip.negative === "NotEarlyError" ?
|
||||
testDescrip.negative : (testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
||||
testDescrip.negative : ".");
|
||||
if (window.iframeError === undefined) { //no exception was thrown
|
||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
||||
'fail',
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter07/7.6/7.6.1/7.6.1.2-1gs.js
|
||||
* @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'implements' occurs in strict mode code
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter07/7.8/7.8.3/7.8.3-1gs.js
|
||||
* @description Strict Mode - octal extension(010) is forbidden in strict mode
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* @path chapter07/7.8/7.8.5/7.8.5-1gs.js
|
||||
* @description Empty literal RegExp should result in a SyntaxError
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
throw NotEarlyError;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter10/10.1/10.1.1/10.1.1-2gs.js
|
||||
* @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';'
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict"
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter10/10.1/10.1.1/10.1.1-5gs.js
|
||||
* @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the start of the code
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter10/10.1/10.1.1/10.1.1-8gs.js
|
||||
* @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the code
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter10/10.4/10.4.2/10.4.2.1-1gs.js
|
||||
* @description Strict Mode - eval code cannot instantiate variable in the variable environment of the calling context that invoked the eval if the code of the calling context is strict code
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter10/10.5/10.5-1gs.js
|
||||
* @description Strict Mode - arguments cannot be assigned to in a strict function
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter11/11.13/11.13.2/11.13.2-6-1gs.js
|
||||
* @description Strict Mode - SyntaxError is throw if the identifier eval appears as the LeftHandSideExpression of a Compound Assignment operator(*=)
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter11/11.3/11.3.1/11.3.1-2-1gs.js
|
||||
* @description Strict Mode - SyntaxError is throw if the identifier arguments appear as a PostfixExpression(arguments++)
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter11/11.4/11.4.5/11.4.5-2-2gs.js
|
||||
* @description Strict Mode - SyntaxError is throw if the UnaryExpression operated upon by a Prefix Increment operator(--arguments)
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter12/12.10/12.10.1/12.10.1-11gs.js
|
||||
* @description Strict Mode - SyntaxError is thrown when using with statement
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter12/12.14/12.14.1/12.14.1-1gs.js
|
||||
* @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter13/13.0/13_4-5gs.js
|
||||
* @description Strict Mode - SourceElements is evaluated as strict mode code when a FunctionDeclaration is contained in strict mode code
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -4,7 +4,7 @@
|
||||
* @path chapter15/15.3/15.3.5/15.3.5-2gs.js
|
||||
* @description StrictMode - error is thrown when reading the 'caller' property of a function object
|
||||
* @onlyStrict
|
||||
* @negative NotEarlyError
|
||||
* @negative ^((?!NotEarlyError).)*$
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
@ -23,7 +23,9 @@
|
||||
//An exception is expected
|
||||
if (testDescrip.negative !== undefined) {
|
||||
//TODO - come up with a generic way of catching the error type from window.onerror
|
||||
testDescrip.negative = testDescrip.negative === "NotEarlyError" ? testDescrip.negative : ".";
|
||||
testDescrip.negative = testDescrip.negative === "NotEarlyError" ?
|
||||
testDescrip.negative : (testDescrip.negative === "^((?!NotEarlyError).)*$" ?
|
||||
testDescrip.negative : ".");
|
||||
if (window.iframeError === undefined) { //no exception was thrown
|
||||
testRun(testDescrip.id, testDescrip.path, testDescrip.description, testDescrip.code,
|
||||
'fail',
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user