Remove excess leading whitespace

This commit is contained in:
André Bargull 2023-09-13 13:34:46 +02:00 committed by Ms2ger
parent c140af3cb3
commit 1bd99bf069
89 changed files with 336 additions and 334 deletions

View File

@ -7,9 +7,8 @@ description: Strict Mode - arguments object is immutable
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
(function fun() { (function fun() {
eval("arguments = 10"); eval("arguments = 10");
})(30); })(30);
}); });

View File

@ -7,7 +7,6 @@ description: Strict Mode - arguments object is immutable in eval'ed functions
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());"); eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());");
}); });

View File

@ -6,9 +6,9 @@ es5id: 10.5-7-b-2-s
description: Arguments object index assignment is allowed description: Arguments object index assignment is allowed
---*/ ---*/
function _10_5_7_b_2_fun() { function _10_5_7_b_2_fun() {
arguments[7] = 12; arguments[7] = 12;
return arguments[7] === 12; return arguments[7] === 12;
}; };
assert(_10_5_7_b_2_fun(30), '_10_5_7_b_2_fun(30) !== true'); assert(_10_5_7_b_2_fun(30), '_10_5_7_b_2_fun(30) !== true');

View File

@ -7,9 +7,9 @@ description: >
Adding property to the arguments object successful under strict mode Adding property to the arguments object successful under strict mode
---*/ ---*/
function _10_5_7_b_3_fun() { function _10_5_7_b_3_fun() {
arguments[1] = 12; arguments[1] = 12;
return arguments[0] === 30 && arguments[1] === 12; return arguments[0] === 30 && arguments[1] === 12;
}; };
assert(_10_5_7_b_3_fun(30), '_10_5_7_b_3_fun(30) !== true'); assert(_10_5_7_b_3_fun(30), '_10_5_7_b_3_fun(30) !== true');

View File

@ -7,11 +7,11 @@ description: >
Deleting property of the arguments object successful under strict mode Deleting property of the arguments object successful under strict mode
---*/ ---*/
function _10_5_7_b_4_fun() { function _10_5_7_b_4_fun() {
var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12; var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12;
delete arguments[1]; delete arguments[1];
var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === "undefined"; var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === "undefined";
return _10_5_7_b_4_1 && _10_5_7_b_4_2; return _10_5_7_b_4_1 && _10_5_7_b_4_2;
}; };
assert(_10_5_7_b_4_fun(30, 12), '_10_5_7_b_4_fun(30, 12) !== true'); assert(_10_5_7_b_4_fun(30, 12), '_10_5_7_b_4_fun(30, 12) !== true');

View File

@ -9,10 +9,10 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
function foo(a,b,c) function foo(a,b,c)
{ {
a = 1; b = 'str'; c = 2.1; a = 1; b = 'str'; c = 2.1;
return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1); return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1);
} }
assert(foo(10, 'sss', 1), 'foo(10, "sss", 1) !== true'); assert(foo(10, 'sss', 1), 'foo(10, "sss", 1) !== true');

View File

@ -7,11 +7,11 @@ description: arguments[i] change with actual parameters
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo(a,b,c) function foo(a,b,c)
{ {
a = 1; b = 'str'; c = 2.1; a = 1; b = 'str'; c = 2.1;
if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1) if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1)
return true; return true;
} }
assert(foo(10,'sss',1), 'foo(10,"sss",1) !== true'); assert(foo(10,'sss',1), 'foo(10,"sss",1) !== true');

View File

@ -7,11 +7,11 @@ description: arguments[i] map to actual parameter
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo(a,b,c) function foo(a,b,c)
{ {
arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1;
if(1 === a && 'str' === b && 2.1 === c) if(1 === a && 'str' === b && 2.1 === c)
return true; return true;
} }
assert(foo(10,'sss',1), 'foo(10,"sss",1) !== true'); assert(foo(10,'sss',1), 'foo(10,"sss",1) !== true');

View File

@ -10,22 +10,22 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var data = "data"; var data = "data";
var getFunc = function () { var getFunc = function () {
return data; return data;
}; };
var setFunc = function (value) { var setFunc = function (value) {
data = value; data = value;
}; };
Object.defineProperty(Object.prototype, "0", { Object.defineProperty(Object.prototype, "0", {
get: getFunc, get: getFunc,
set: setFunc, set: setFunc,
configurable: true configurable: true
}); });
var argObj = (function () { return arguments })(1); var argObj = (function () { return arguments })(1);
verifyProperty(argObj, "0", { verifyProperty(argObj, "0", {
value: 1, value: 1,

View File

@ -9,5 +9,5 @@ flags: [noStrict]
function testcase() { function testcase() {
arguments.callee; arguments.callee;
} }
testcase(); testcase();

View File

@ -15,5 +15,5 @@ function testcase() {
assert.sameValue(desc.writable, true, 'desc.writable'); assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")'); assert.sameValue(desc.hasOwnProperty('get'), false, 'desc.hasOwnProperty("get")');
assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")'); assert.sameValue(desc.hasOwnProperty('set'), false, 'desc.hasOwnProperty("set")');
} }
testcase(); testcase();

View File

@ -10,13 +10,13 @@ includes: [propertyHelper.js]
flags: [noStrict] flags: [noStrict]
---*/ ---*/
Object.defineProperty(Object.prototype, "callee", { Object.defineProperty(Object.prototype, "callee", {
value: 1, value: 1,
writable: false, writable: false,
configurable: true configurable: true
}); });
var argObj = (function () { return arguments })(); var argObj = (function () { return arguments })();
assert.sameValue(typeof argObj.callee, "function"); assert.sameValue(typeof argObj.callee, "function");

View File

@ -8,24 +8,24 @@ flags: [noStrict]
features: [caller] features: [caller]
---*/ ---*/
var called = false; var called = false;
function test1(flag) {
if (flag!==true) {
test2();
} else {
called = true;
}
}
function test2() { function test1(flag) {
if(arguments.callee.caller===undefined) { if (flag!==true) {
called=true; // Extension not supported - fake it test2();
} else { } else {
arguments.callee.caller(true); called = true;
}
} }
}
test1();
function test2() {
if(arguments.callee.caller===undefined) {
called=true; // Extension not supported - fake it
} else {
arguments.callee.caller(true);
}
}
test1();
assert(called, 'called !== true'); assert(called, 'called !== true');

View File

@ -8,25 +8,25 @@ flags: [noStrict]
features: [caller] features: [caller]
---*/ ---*/
var called = false; var called = false;
function test1(flag) {
if (flag!==true) {
test2();
} else {
called = true;
}
}
function test2() { function test1(flag) {
if (arguments.callee.caller===undefined) { if (flag!==true) {
called = true; //Extension not supported - fake it test2();
} else { } else {
var explicit = arguments.callee.caller; called = true;
explicit(true);
}
} }
}
test1();
function test2() {
if (arguments.callee.caller===undefined) {
called = true; //Extension not supported - fake it
} else {
var explicit = arguments.callee.caller;
explicit(true);
}
}
test1();
assert(called, 'called !== true'); assert(called, 'called !== true');

View File

@ -9,5 +9,5 @@ description: arguments.callee is exists
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); var desc = Object.getOwnPropertyDescriptor(arguments,"callee");
assert.notSameValue(desc, undefined); assert.notSameValue(desc, undefined);
} }
testcase(); testcase();

View File

@ -16,5 +16,5 @@ function testcase() {
assert.sameValue(desc.hasOwnProperty('writable'), false, 'desc.hasOwnProperty("writable")'); assert.sameValue(desc.hasOwnProperty('writable'), false, 'desc.hasOwnProperty("writable")');
assert.sameValue(desc.hasOwnProperty('get'), true, 'desc.hasOwnProperty("get")'); assert.sameValue(desc.hasOwnProperty('get'), true, 'desc.hasOwnProperty("get")');
assert.sameValue(desc.hasOwnProperty('set'), true, 'desc.hasOwnProperty("set")'); assert.sameValue(desc.hasOwnProperty('set'), true, 'desc.hasOwnProperty("set")');
} }
testcase(); testcase();

View File

@ -8,9 +8,9 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var argObj = function () { var argObj = function () {
return arguments; return arguments;
} (); } ();
verifyProperty(argObj, "callee", { verifyProperty(argObj, "callee", {
enumerable: false, enumerable: false,

View File

@ -9,9 +9,10 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
var argObj = function () { var argObj = function () {
return arguments; return arguments;
} (); } ();
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
argObj.callee = {}; argObj.callee = {};
}); });

View File

@ -10,5 +10,5 @@ description: >
function testcase() { function testcase() {
assert.sameValue(Object.getPrototypeOf(arguments), Object.getPrototypeOf({})); assert.sameValue(Object.getPrototypeOf(arguments), Object.getPrototypeOf({}));
} }
testcase(); testcase();

View File

@ -7,8 +7,7 @@ description: "'length property of arguments object exists"
---*/ ---*/
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(arguments,"length"); var desc = Object.getOwnPropertyDescriptor(arguments,"length");
assert.notSameValue(desc, undefined); assert.notSameValue(desc, undefined);
} }
testcase(); testcase();

View File

@ -13,5 +13,5 @@ function testcase() {
enumerable: false, enumerable: false,
configurable: true, configurable: true,
}); });
} }
testcase(); testcase();

View File

@ -10,5 +10,5 @@ description: >
function testcase() { function testcase() {
assert.sameValue(arguments.length, 0); assert.sameValue(arguments.length, 0);
} }
testcase(); testcase();

View File

@ -10,7 +10,7 @@ flags: [noStrict]
---*/ ---*/
function testcase() { function testcase() {
var arguments= undefined; var arguments= undefined;
(function () { assert.sameValue(arguments.length, 0); })(); (function () { assert.sameValue(arguments.length, 0); })();
} }
testcase(); testcase();

View File

@ -9,6 +9,6 @@ description: >
---*/ ---*/
function testcase(a,b,c) { function testcase(a,b,c) {
assert.sameValue(arguments.length, 0); assert.sameValue(arguments.length, 0);
} }
testcase(); testcase();

View File

@ -10,7 +10,7 @@ flags: [noStrict]
---*/ ---*/
function testcase() { function testcase() {
var arguments= undefined; var arguments= undefined;
(function (a,b,c) { assert.sameValue(arguments.length, 0); })(); (function (a,b,c) { assert.sameValue(arguments.length, 0); })();
} }
testcase(); testcase();

View File

@ -9,22 +9,22 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var data = "data"; var data = "data";
var getFunc = function () { var getFunc = function () {
return 12; return 12;
}; };
var setFunc = function (value) { var setFunc = function (value) {
data = value; data = value;
}; };
Object.defineProperty(Object.prototype, "length", { Object.defineProperty(Object.prototype, "length", {
get: getFunc, get: getFunc,
set: setFunc, set: setFunc,
configurable: true configurable: true
}); });
var argObj = (function () { return arguments })(); var argObj = (function () { return arguments })();
verifyProperty(argObj, "length", { verifyProperty(argObj, "length", {
value: 0, value: 0,

View File

@ -7,17 +7,16 @@ description: this is not coerced to an object in strict mode (Number)
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo() function foo()
{ {
'use strict'; 'use strict';
return typeof(this); return typeof(this);
} }
function bar()
{
return typeof(this);
}
function bar()
{
return typeof(this);
}
assert.sameValue(foo.call(1), 'number', 'foo.call(1)'); assert.sameValue(foo.call(1), 'number', 'foo.call(1)');
assert.sameValue(bar.call(1), 'object', 'bar.call(1)'); assert.sameValue(bar.call(1), 'object', 'bar.call(1)');

View File

@ -16,5 +16,5 @@ function f() {
return "a"; return "a";
} }
if (("ab".replace("b", f)!=="aa") || (x!==undefined)) { if (("ab".replace("b", f)!=="aa") || (x!==undefined)) {
throw "'this' had incorrect value!"; throw "'this' had incorrect value!";
} }

View File

@ -17,5 +17,5 @@ function f() {
} }
if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==this)) { if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==this)) {
throw "'this' had incorrect value!"; throw "'this' had incorrect value!";
} }

View File

@ -11,10 +11,10 @@ description: >
var x = 3; var x = 3;
assert.sameValue("ab".replace("b", (function () { assert.sameValue("ab".replace("b", (function () {
"use strict"; "use strict";
return function () { return function () {
x = this; x = this;
return "a"; return "a";
} }
})()), "aa"); })()), "aa");
assert.sameValue(x, undefined, 'x'); assert.sameValue(x, undefined, 'x');

View File

@ -10,11 +10,11 @@ description: >
var x = 3; var x = 3;
if ( ("ab".replace("b", (function () { if ( ("ab".replace("b", (function () {
"use strict"; "use strict";
return function () { return function () {
x = this; x = this;
return "a"; return "a";
} }
})())!=="aa") || (x!==undefined)) { })())!=="aa") || (x!==undefined)) {
throw "'this' had incorrect value!"; throw "'this' had incorrect value!";
} }

View File

@ -8,7 +8,7 @@ description: >
Abstract equality operator should succeed. Abstract equality operator should succeed.
---*/ ---*/
Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); Object.defineProperty(Object.prototype, "x", { get: function () { return this; } });
assert.sameValue((5).x == 0, false, '(5).x == 0'); assert.sameValue((5).x == 0, false, '(5).x == 0');
assert((5).x == 5, '(5).x == 5'); assert((5).x == 5, '(5).x == 5');

View File

@ -9,6 +9,6 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); Object.defineProperty(Object.prototype, "x", { get: function () { return this; } });
assert((5).x === 5, '(5).x === 5'); assert((5).x === 5, '(5).x === 5');

View File

@ -12,7 +12,7 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); Object.defineProperty(Object.prototype, "x", { get: function () { return this; } });
assert.sameValue((5).x === 5, false, '(5).x === 5'); assert.sameValue((5).x === 5, false, '(5).x === 5');
assert.sameValue(typeof (5).x, "object", 'typeof (5).x'); assert.sameValue(typeof (5).x, "object", 'typeof (5).x');

View File

@ -12,6 +12,6 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); Object.defineProperty(Object.prototype, "x", { get: function () { return this; } });
assert.sameValue(typeof (5).x, "number", 'typeof (5).x'); assert.sameValue(typeof (5).x, "number", 'typeof (5).x');

View File

@ -7,17 +7,16 @@ description: this is not coerced to an object in strict mode (string)
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo() function foo()
{ {
'use strict'; 'use strict';
return typeof(this); return typeof(this);
} }
function bar()
{
return typeof(this);
}
function bar()
{
return typeof(this);
}
assert.sameValue(foo.call('1'), 'string', 'foo.call("1")'); assert.sameValue(foo.call('1'), 'string', 'foo.call("1")');
assert.sameValue(bar.call('1'), 'object', 'bar.call("1")'); assert.sameValue(bar.call('1'), 'object', 'bar.call("1")');

View File

@ -7,16 +7,16 @@ description: this is not coerced to an object in strict mode (undefined)
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo() function foo()
{ {
'use strict'; 'use strict';
return typeof(this); return typeof(this);
} }
function bar() function bar()
{ {
return typeof(this); return typeof(this);
} }
assert.sameValue(foo.call(undefined), 'undefined', 'foo.call(undefined)'); assert.sameValue(foo.call(undefined), 'undefined', 'foo.call(undefined)');
assert.sameValue(bar.call(), 'object', 'bar.call()'); assert.sameValue(bar.call(), 'object', 'bar.call()');

View File

@ -7,17 +7,16 @@ description: this is not coerced to an object in strict mode (boolean)
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo() function foo()
{ {
'use strict'; 'use strict';
return typeof(this); return typeof(this);
} }
function bar()
{
return typeof(this);
}
function bar()
{
return typeof(this);
}
assert.sameValue(foo.call(true), 'boolean', 'foo.call(true)'); assert.sameValue(foo.call(true), 'boolean', 'foo.call(true)');
assert.sameValue(bar.call(true), 'object', 'bar.call(true)'); assert.sameValue(bar.call(true), 'object', 'bar.call(true)');

View File

@ -6,20 +6,20 @@ es5id: 10.4.3-1-5-s
description: this is not coerced to an object (function) description: this is not coerced to an object (function)
---*/ ---*/
function foo() function foo()
{ {
'use strict'; 'use strict';
return typeof(this); return typeof(this);
} }
function bar() function bar()
{ {
return typeof(this); return typeof(this);
} }
function foobar() function foobar()
{ {
} }
assert.sameValue(foo.call(foobar), 'function', 'foo.call(foobar)'); assert.sameValue(foo.call(foobar), 'function', 'foo.call(foobar)');
assert.sameValue(bar.call(foobar), 'function', 'bar.call(foobar)'); assert.sameValue(bar.call(foobar), 'function', 'bar.call(foobar)');

View File

@ -13,5 +13,5 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
var _13_0_12_fun = new Function(" ","eval = 42;"); var _13_0_12_fun = new Function(" ","eval = 42;");
_13_0_12_fun(); _13_0_12_fun();

View File

@ -13,7 +13,6 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("var _13_0_13_fun = new Function(\" \", \"'use strict'; eval = 42;\"); _13_0_13_fun();"); eval("var _13_0_13_fun = new Function(\" \", \"'use strict'; eval = 42;\"); _13_0_13_fun();");
}); });

View File

@ -13,8 +13,7 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
var _13_0_14_fun = new Function(" ", "'use strict'; eval = 42; "); var _13_0_14_fun = new Function(" ", "'use strict'; eval = 42; ");
_13_0_14_fun(); _13_0_14_fun();
}); });

View File

@ -13,8 +13,7 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; function _13_0_15_fun() {eval = 42;};"); eval("'use strict'; function _13_0_15_fun() {eval = 42;};");
_13_0_15_fun(); _13_0_15_fun();
}); });

View File

@ -15,6 +15,6 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; var _13_0_16_fun = function () {eval = 42;};"); eval("'use strict'; var _13_0_16_fun = function () {eval = 42;};");
_13_0_16_fun(); _13_0_16_fun();
}); });

View File

@ -13,4 +13,4 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
eval("'use strict'; var _13_0_17_fun = new Function('eval = 42;'); _13_0_17_fun();"); eval("'use strict'; var _13_0_17_fun = new Function('eval = 42;'); _13_0_17_fun();");

View File

@ -13,8 +13,7 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; function _13_0_7_fun() {eval = 42;};"); eval("'use strict'; function _13_0_7_fun() {eval = 42;};");
_13_0_7_fun(); _13_0_7_fun();
}); });

View File

@ -14,6 +14,6 @@ flags: [onlyStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("var _13_0_8_fun = function () {eval = 42;};"); eval("var _13_0_8_fun = function () {eval = 42;};");
_13_0_8_fun(); _13_0_8_fun();
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict';function _13_1_19_fun(arguments) { }"); eval("'use strict';function _13_1_19_fun(arguments) { }");
}); });

View File

@ -14,7 +14,6 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("var _13_1_2_fun = function (eval) { }"); eval("var _13_1_2_fun = function (eval) { }");
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; var _13_1_21_fun = function (arguments) { }"); eval("'use strict'; var _13_1_21_fun = function (arguments) { }");
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("var _13_1_22_fun = function (arguments) { 'use strict'; }"); eval("var _13_1_22_fun = function (arguments) { 'use strict'; }");
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; function _13_1_23_fun(param, param) { }"); eval("'use strict'; function _13_1_23_fun(param, param) { }");
}); });

View File

@ -17,5 +17,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }"); eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }");
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; function _13_1_27_fun(param, param, param) { }"); eval("'use strict'; function _13_1_27_fun(param, param, param) { }");
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; var _13_1_29_fun = function (param, param) { };"); eval("'use strict'; var _13_1_29_fun = function (param, param) { };");
}); });

View File

@ -17,5 +17,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };"); eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };");
}); });

View File

@ -16,5 +16,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };") eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };")
}); });

View File

@ -11,5 +11,5 @@ flags: [noStrict]
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; function arguments() { };") eval("'use strict'; function arguments() { };")
}); });

View File

@ -14,7 +14,6 @@ description: >
flags: [onlyStrict] flags: [onlyStrict]
---*/ ---*/
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("var _13_1_4_fun = function (arguments) { };"); eval("var _13_1_4_fun = function (arguments) { };");
}); });

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var _13_1_41_s = {}; var _13_1_41_s = {};
assert.throws(SyntaxError, function() { assert.throws(SyntaxError, function() {
eval("'use strict'; _13_1_41_s.x = function arguments() {};"); eval("'use strict'; _13_1_41_s.x = function arguments() {};");
}); });

View File

@ -8,9 +8,9 @@ description: >
function objects is allowed under both strict and normal modes. function objects is allowed under both strict and normal modes.
---*/ ---*/
var foo = function () { var foo = function () {
this.caller = 12; this.caller = 12;
} }
var obj = new foo(); var obj = new foo();
assert.sameValue(obj.caller, 12, 'obj.caller'); assert.sameValue(obj.caller, 12, 'obj.caller');

View File

@ -8,7 +8,8 @@ description: >
is not allowed outside the function is not allowed outside the function
---*/ ---*/
var foo = Function("'use strict';"); var foo = Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
foo.caller = 41; foo.caller = 41;
}); });

View File

@ -8,8 +8,8 @@ description: >
'caller' fails outside of the function 'caller' fails outside of the function
---*/ ---*/
var foo = Function("'use strict';"); var foo = Function("'use strict';");
for (var tempIndex in foo) { for (var tempIndex in foo) {
assert.notSameValue(tempIndex, "caller", 'tempIndex'); assert.notSameValue(tempIndex, "caller", 'tempIndex');
} }

View File

@ -8,5 +8,5 @@ description: >
'caller' fails inside the function 'caller' fails inside the function
---*/ ---*/
var foo = Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'caller', 'tempIndex');}"); var foo = Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'caller', 'tempIndex');}");
foo.call(foo); foo.call(foo);

View File

@ -8,7 +8,8 @@ description: >
objects is not allowed outside the function objects is not allowed outside the function
---*/ ---*/
var foo = new Function("'use strict';"); var foo = new Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var temp = foo.arguments; var temp = foo.arguments;
}); });

View File

@ -8,7 +8,8 @@ description: >
objects is not allowed outside the function objects is not allowed outside the function
---*/ ---*/
var foo = new Function("'use strict';"); var foo = new Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
foo.arguments = 41; foo.arguments = 41;
}); });

View File

@ -8,8 +8,8 @@ description: >
'arguments' fails outside of the function 'arguments' fails outside of the function
---*/ ---*/
var foo = new Function("'use strict';"); var foo = new Function("'use strict';");
for (var tempIndex in foo) { for (var tempIndex in foo) {
assert.notSameValue(tempIndex, "arguments", 'tempIndex'); assert.notSameValue(tempIndex, "arguments", 'tempIndex');
} }

View File

@ -8,5 +8,5 @@ description: >
'arguments' fails inside the function 'arguments' fails inside the function
---*/ ---*/
var foo = new Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'arguments', 'tempIndex');}"); var foo = new Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'arguments', 'tempIndex');}");
foo.call(foo); foo.call(foo);

View File

@ -10,24 +10,24 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor"); var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor");
var getFunc = function () { var getFunc = function () {
return 100; return 100;
}; };
var data = "data"; var data = "data";
var setFunc = function (value) { var setFunc = function (value) {
data = value; data = value;
}; };
Object.defineProperty(Object.prototype, "constructor", { Object.defineProperty(Object.prototype, "constructor", {
get: getFunc, get: getFunc,
set: setFunc, set: setFunc,
configurable: true configurable: true
}); });
var fun = function () {}; var fun = function () {};
assert.sameValue(typeof fun.prototype.constructor, "function"); assert.sameValue(typeof fun.prototype.constructor, "function");

View File

@ -8,7 +8,8 @@ description: >
objects is not allowed outside the function objects is not allowed outside the function
---*/ ---*/
var foo = Function("'use strict';"); var foo = Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var temp = foo.arguments; var temp = foo.arguments;
}); });

View File

@ -8,7 +8,8 @@ description: >
objects is not allowed outside the function objects is not allowed outside the function
---*/ ---*/
var foo = Function("'use strict';"); var foo = Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
foo.arguments = 41; foo.arguments = 41;
}); });

View File

@ -8,8 +8,8 @@ description: >
'arguments' fails outside of the function 'arguments' fails outside of the function
---*/ ---*/
var foo = Function("'use strict';"); var foo = Function("'use strict';");
for (var tempIndex in foo) { for (var tempIndex in foo) {
assert.notSameValue(tempIndex, "arguments", 'tempIndex'); assert.notSameValue(tempIndex, "arguments", 'tempIndex');
} }

View File

@ -11,7 +11,7 @@ flags: [onlyStrict]
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var foo = function () { var foo = function () {
} }
foo.caller = 20; foo.caller = 20;
}); });

View File

@ -9,5 +9,5 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var foo = Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'arguments', 'tempIndex');}"); var foo = Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'arguments', 'tempIndex');}");
foo.call(foo); foo.call(foo);

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () {"use strict";} function foo () {"use strict";}
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var temp = foo.caller; var temp = foo.caller;
}); });

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () {"use strict";} function foo () {"use strict";}
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
foo.caller = 41; foo.caller = 41;
}); });

View File

@ -9,7 +9,7 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () {"use strict";} function foo () {"use strict";}
for (var tempIndex in foo) { for (var tempIndex in foo) {
assert.notSameValue(tempIndex, "caller", 'tempIndex'); assert.notSameValue(tempIndex, "caller", 'tempIndex');
} }

View File

@ -9,11 +9,11 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () { function foo () {
"use strict"; "use strict";
for (var tempIndex in this) { for (var tempIndex in this) {
assert.notSameValue(tempIndex, "caller", 'tempIndex'); assert.notSameValue(tempIndex, "caller", 'tempIndex');
} }
} }
foo.call(foo); foo.call(foo);

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () {"use strict";} function foo () {"use strict";}
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var temp = foo.arguments; var temp = foo.arguments;
}); });

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () {"use strict";} function foo () {"use strict";}
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
foo.arguments = 41; foo.arguments = 41;
}); });

View File

@ -9,8 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo () {"use strict";} function foo () {"use strict";}
for (var tempIndex in foo) { for (var tempIndex in foo) {
assert.notSameValue(tempIndex, "arguments", 'tempIndex'); assert.notSameValue(tempIndex, "arguments", 'tempIndex');
} }

View File

@ -9,10 +9,10 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
function foo() { function foo() {
"use strict"; "use strict";
for (var tempIndex in this) { for (var tempIndex in this) {
assert.notSameValue(tempIndex, "arguments", 'tempIndex'); assert.notSameValue(tempIndex, "arguments", 'tempIndex');
} }
} }
foo.call(foo); foo.call(foo);

View File

@ -8,9 +8,9 @@ description: >
of function objects is allowed under both strict and normal modes. of function objects is allowed under both strict and normal modes.
---*/ ---*/
var foo = function () { var foo = function () {
this.arguments = 12; this.arguments = 12;
} }
var obj = new foo(); var obj = new foo();
assert.sameValue(obj.arguments, 12, 'obj.arguments'); assert.sameValue(obj.arguments, 12, 'obj.arguments');

View File

@ -11,7 +11,7 @@ flags: [onlyStrict]
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var foo = function () { var foo = function () {
} }
foo.arguments = 20; foo.arguments = 20;
}); });

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var foo = new Function("'use strict';"); var foo = new Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var temp = foo.caller; var temp = foo.caller;
}); });

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var foo = new Function("'use strict';"); var foo = new Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
foo.caller = 41; foo.caller = 41;
}); });

View File

@ -9,8 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var foo = new Function("'use strict';"); var foo = new Function("'use strict';");
for (var tempIndex in foo) { for (var tempIndex in foo) {
assert.notSameValue(tempIndex, "caller", 'tempIndex'); assert.notSameValue(tempIndex, "caller", 'tempIndex');
} }

View File

@ -9,5 +9,5 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var foo = new Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'caller', 'tempIndex');}"); var foo = new Function("'use strict'; for (var tempIndex in this) {assert.notSameValue(tempIndex, 'caller', 'tempIndex');}");
foo.call(foo); foo.call(foo);

View File

@ -9,7 +9,8 @@ description: >
flags: [noStrict] flags: [noStrict]
---*/ ---*/
var foo = Function("'use strict';"); var foo = Function("'use strict';");
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
var temp = foo.caller; var temp = foo.caller;
}); });