mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
Replace runTestCase with assert.throws [test/language/]
This commit is contained in:
parent
7f55f60b5f
commit
1f97345668
@ -5,17 +5,11 @@
|
|||||||
es5id: 10.5-1-s
|
es5id: 10.5-1-s
|
||||||
description: Strict Mode - arguments object is immutable
|
description: Strict Mode - arguments object is immutable
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
(function fun() {
|
(function fun() {
|
||||||
eval("arguments = 10");
|
eval("arguments = 10");
|
||||||
})(30);
|
})(30);
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,15 +5,9 @@
|
|||||||
es5id: 10.5-7-b-1-s
|
es5id: 10.5-7-b-1-s
|
||||||
description: Strict Mode - arguments object is immutable in eval'ed functions
|
description: Strict Mode - arguments object is immutable in eval'ed functions
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());");
|
eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
Accessing caller property of Arguments object throws TypeError in
|
Accessing caller property of Arguments object throws TypeError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try
|
assert.throws(TypeError, function() {
|
||||||
{
|
|
||||||
arguments.caller;
|
arguments.caller;
|
||||||
}
|
});
|
||||||
catch (e) {
|
|
||||||
if(e instanceof TypeError)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
Accessing callee property of Arguments object throws TypeError in
|
Accessing callee property of Arguments object throws TypeError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try
|
assert.throws(TypeError, function() {
|
||||||
{
|
|
||||||
arguments.callee;
|
arguments.callee;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof TypeError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,19 +7,11 @@ description: >
|
|||||||
Strict Mode - TypeError is thrown when accessing the [[Set]]
|
Strict Mode - TypeError is thrown when accessing the [[Set]]
|
||||||
attribute in 'caller' under strict mode
|
attribute in 'caller' under strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var argObj = function () {
|
var argObj = function () {
|
||||||
return arguments;
|
return arguments;
|
||||||
} ();
|
} ();
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
try {
|
|
||||||
argObj.caller = {};
|
argObj.caller = {};
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,19 +7,11 @@ description: >
|
|||||||
Strict Mode - TypeError is thrown when accessing the [[Set]]
|
Strict Mode - TypeError is thrown when accessing the [[Set]]
|
||||||
attribute in 'callee' under strict mode
|
attribute in 'callee' under strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var argObj = function () {
|
var argObj = function () {
|
||||||
return arguments;
|
return arguments;
|
||||||
} ();
|
} ();
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
try {
|
|
||||||
argObj.callee = {};
|
argObj.callee = {};
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,11 +8,10 @@ description: >
|
|||||||
contains Use Strict Directive which appears at the start of the
|
contains Use Strict Directive which appears at the start of the
|
||||||
block(getter)
|
block(getter)
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, "accProperty", {
|
Object.defineProperty(obj, "accProperty", {
|
||||||
get: function () {
|
get: function () {
|
||||||
@ -22,9 +21,4 @@ function testcase() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
var temp = obj.accProperty === 11;
|
var temp = obj.accProperty === 11;
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,16 +8,10 @@ description: >
|
|||||||
contains Use Strict Directive which appears at the start of the
|
contains Use Strict Directive which appears at the start of the
|
||||||
block
|
block
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
var funObj = new Function("a", "'use strict'; eval('public = 1;');");
|
var funObj = new Function("a", "'use strict'; eval('public = 1;');");
|
||||||
funObj();
|
funObj();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: implements (implements)
|
Names in UTF8: implements (implements)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var \u0069mplements = 123;");
|
eval("var \u0069mplements = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: l\u0065t (let)
|
Names in UTF8: l\u0065t (let)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var l\u0065t = 123;");
|
eval("var l\u0065t = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: privat\u0065 (private)
|
Names in UTF8: privat\u0065 (private)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var privat\u0065 = 123;");
|
eval("var privat\u0065 = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public)
|
Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var \u0070\u0075\u0062\u006c\u0069\u0063 = 123;");
|
eval("var \u0070\u0075\u0062\u006c\u0069\u0063 = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: \u0079ield (yield)
|
Names in UTF8: \u0079ield (yield)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var \u0079ield = 123;");
|
eval("var \u0079ield = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: inte\u0072face (interface)
|
Names in UTF8: inte\u0072face (interface)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var inte\u0072face = 123;");
|
eval("var inte\u0072face = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: packag\u0065 (package)
|
Names in UTF8: packag\u0065 (package)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var packag\u0065 = 123;");
|
eval("var packag\u0065 = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,15 +8,9 @@ description: >
|
|||||||
Names in UTF8:
|
Names in UTF8:
|
||||||
\u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected)
|
\u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 123;");
|
eval("var \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
7.6 - SyntaxError expected: reserved words used as Identifier
|
7.6 - SyntaxError expected: reserved words used as Identifier
|
||||||
Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static)
|
Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static)
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var \u0073\u0074\u0061\u0074\u0069\u0063 = 123;");
|
eval("var \u0073\u0074\u0061\u0074\u0069\u0063 = 123;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'implements' occurs in strict mode code
|
'implements' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var implements = 1;");
|
eval("var implements = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord 'let'
|
Strict Mode - SyntaxError is thrown when FutureReservedWord 'let'
|
||||||
occurs in strict mode code
|
occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var let = 1;");
|
eval("var let = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'private' occurs in strict mode code
|
'private' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var private = 1;");
|
eval("var private = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'public' occurs in strict mode code
|
'public' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var public = 1;");
|
eval("var public = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'yield' occurs in strict mode code
|
'yield' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var yield = 1;")
|
eval("var yield = 1;")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'interface' occurs in strict mode code
|
'interface' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var interface = 1;")
|
eval("var interface = 1;")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'package' occurs in strict mode code
|
'package' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var package = 1;");
|
eval("var package = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'protected' occurs in strict mode code
|
'protected' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var protected = 1;");
|
eval("var protected = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
Strict Mode - SyntaxError is thrown when FutureReservedWord
|
||||||
'static' occurs in strict mode code
|
'static' occurs in strict mode code
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var static = 1;");
|
eval("var static = 1;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 7.3-10
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <PS> (\u2029) as a
|
7.3 - ES5 recognizes the character <PS> (\u2029) as a
|
||||||
NonEscapeCharacter
|
NonEscapeCharacter
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var prop = \\u2029;");
|
eval("var prop = \\u2029;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 7.3-3
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
|
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
|
||||||
SingleLineComments
|
SingleLineComments
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("//Single Line Comments\u2028 var =;");
|
eval("//Single Line Comments\u2028 var =;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 7.3-4
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
|
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
|
||||||
SingleLineComments
|
SingleLineComments
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("//Single Line Comments\u2029 var =;");
|
eval("//Single Line Comments\u2029 var =;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 7.3-7
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
|
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
|
||||||
regular expression literals
|
regular expression literals
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var regExp = /[\u2028]/");
|
eval("var regExp = /[\u2028]/");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 7.3-8
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
|
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
|
||||||
regular expression literals
|
regular expression literals
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var regExp = /[\u2029]/");
|
eval("var regExp = /[\u2029]/");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 7.3-9
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <LS> (\u2028) as a
|
7.3 - ES5 recognizes the character <LS> (\u2028) as a
|
||||||
NonEscapeCharacter
|
NonEscapeCharacter
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var prop = \\u2028;");
|
eval("var prop = \\u2028;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Literal RegExp Objects - SyntaxError exception is thrown if the
|
Literal RegExp Objects - SyntaxError exception is thrown if the
|
||||||
RegularExpressionNonTerminator position of a
|
RegularExpressionNonTerminator position of a
|
||||||
RegularExpressionBackslashSequence is a LineTerminator.
|
RegularExpressionBackslashSequence is a LineTerminator.
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var regExp = /\\\rn/;");
|
eval("var regExp = /\\\rn/;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,18 +6,9 @@ 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
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval(' "asterisk: \\052" /* octal escape sequences forbidden in strict mode*/ ; "use strict";');
|
eval(' "asterisk: \\052" /* octal escape sequences forbidden in strict mode*/ ; "use strict";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-10-s
|
es5id: 7.8.4-10-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = " \\10 ";');
|
eval('var x = " \\10 ";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-11-s
|
es5id: 7.8.4-11-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\16";');
|
eval('var x = "\\16";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-12-s
|
es5id: 7.8.4-12-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\17";');
|
eval('var x = "\\17";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-13-s
|
es5id: 7.8.4-13-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\30";');
|
eval('var x = "\\30";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-14-s
|
es5id: 7.8.4-14-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\31";');
|
eval('var x = "\\31";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-15-s
|
es5id: 7.8.4-15-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\37";');
|
eval('var x = "\\37";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-16-s
|
es5id: 7.8.4-16-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\400";');
|
eval('var x = "\\400";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-17-s
|
es5id: 7.8.4-17-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\411";');
|
eval('var x = "\\411";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-18-s
|
es5id: 7.8.4-18-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\43a";');
|
eval('var x = "\\43a";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-19-s
|
es5id: 7.8.4-19-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\463";');
|
eval('var x = "\\463";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-2-s
|
es5id: 7.8.4-2-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\1";');
|
eval('var x = "\\1";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-20-s
|
es5id: 7.8.4-20-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\474";');
|
eval('var x = "\\474";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-21-s
|
es5id: 7.8.4-21-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\77";');
|
eval('var x = "\\77";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-22-s
|
es5id: 7.8.4-22-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\777";');
|
eval('var x = "\\777";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-23-s
|
es5id: 7.8.4-23-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\000";');
|
eval('var x = "\\000";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-24-s
|
es5id: 7.8.4-24-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\001";');
|
eval('var x = "\\001";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-25-s
|
es5id: 7.8.4-25-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\106";');
|
eval('var x = "\\106";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-26-s
|
es5id: 7.8.4-26-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\207";');
|
eval('var x = "\\207";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-27-s
|
es5id: 7.8.4-27-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\377";');
|
eval('var x = "\\377";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-28-s
|
es5id: 7.8.4-28-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\376";');
|
eval('var x = "\\376";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-29-s
|
es5id: 7.8.4-29-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\3760";');
|
eval('var x = "\\3760";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-3-s
|
es5id: 7.8.4-3-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "a\\4";');
|
eval('var x = "a\\4";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-30-s
|
es5id: 7.8.4-30-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\' + '1";');
|
eval('var x = "\\' + '1";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-31-s
|
es5id: 7.8.4-31-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\" + "1";');
|
eval('var x = "\\" + "1";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,18 +7,9 @@ description: >
|
|||||||
Two OctalEscapeSequences in a String are not allowed in a String
|
Two OctalEscapeSequences in a String are not allowed in a String
|
||||||
under Strict Mode
|
under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\1\\1";');
|
eval('var x = "\\1\\1";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,18 +7,9 @@ description: >
|
|||||||
Three OctalEscapeSequences in a String are not allowed in a String
|
Three OctalEscapeSequences in a String are not allowed in a String
|
||||||
under Strict Mode
|
under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\1\\2\\7";');
|
eval('var x = "\\1\\2\\7";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-4-s
|
es5id: 7.8.4-4-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "z\\7";');
|
eval('var x = "z\\7";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-5-s
|
es5id: 7.8.4-5-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\00a";');
|
eval('var x = "\\00a";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-6-s
|
es5id: 7.8.4-6-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\01z";');
|
eval('var x = "\\01z";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-7-s
|
es5id: 7.8.4-7-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "a\\03z";');
|
eval('var x = "a\\03z";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-8-s
|
es5id: 7.8.4-8-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = " \\06";');
|
eval('var x = " \\06";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
es5id: 7.8.4-9-s
|
es5id: 7.8.4-9-s
|
||||||
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
description: An OctalEscapeSequence is not allowed in a String under Strict Mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase()
|
|
||||||
{
|
assert.throws(SyntaxError, function() {
|
||||||
try
|
|
||||||
{
|
|
||||||
eval('var x = "\\07 ";');
|
eval('var x = "\\07 ";');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
Strict Mode - ReferenceError is thrown if LeftHandSide evaluates
|
Strict Mode - ReferenceError is thrown if LeftHandSide evaluates
|
||||||
to an unresolvable Reference
|
to an unresolvable Reference
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(ReferenceError, function() {
|
||||||
eval("_8_7_2_1 = 11;");
|
eval("_8_7_2_1 = 11;");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof ReferenceError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,20 +7,12 @@ description: >
|
|||||||
Strict Mode - TypeError is thrown if LeftHandSide is a reference
|
Strict Mode - TypeError is thrown if LeftHandSide is a reference
|
||||||
to a non-writable data property
|
to a non-writable data property
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _8_7_2_3 = {};
|
var _8_7_2_3 = {};
|
||||||
Object.defineProperty(_8_7_2_3, "b", {
|
Object.defineProperty(_8_7_2_3, "b", {
|
||||||
writable: false
|
writable: false
|
||||||
});
|
});
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
try {
|
|
||||||
_8_7_2_3.b = 11;
|
_8_7_2_3.b = 11;
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,21 +7,13 @@ description: >
|
|||||||
Strict Mode - TypeError is thrown if LeftHandSide is a reference
|
Strict Mode - TypeError is thrown if LeftHandSide is a reference
|
||||||
to an accessor property with no setter
|
to an accessor property with no setter
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _8_7_2_4 = {};
|
var _8_7_2_4 = {};
|
||||||
var _8_7_2_4_bValue = 1;
|
var _8_7_2_4_bValue = 1;
|
||||||
Object.defineProperty(_8_7_2_4, "b", {
|
Object.defineProperty(_8_7_2_4, "b", {
|
||||||
get: function () { return _8_7_2_4_bValue; }
|
get: function () { return _8_7_2_4_bValue; }
|
||||||
});
|
});
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
try {
|
|
||||||
_8_7_2_4.b = 11;
|
_8_7_2_4.b = 11;
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,18 +7,10 @@ description: >
|
|||||||
Strict Mode - TypeError is thrown if LeftHandSide is a reference
|
Strict Mode - TypeError is thrown if LeftHandSide is a reference
|
||||||
to a non-existent property of an non-extensible object
|
to a non-existent property of an non-extensible object
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _8_7_2_5 = {};
|
var _8_7_2_5 = {};
|
||||||
Object.preventExtensions(_8_7_2_5);
|
Object.preventExtensions(_8_7_2_5);
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
try {
|
|
||||||
_8_7_2_5.b = 11;
|
_8_7_2_5.b = 11;
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user