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