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]
---*/
assert.throws(SyntaxError, function() {
(function fun() {
eval("arguments = 10");
})(30);
(function fun() {
eval("arguments = 10");
})(30);
});

View File

@ -7,7 +7,6 @@ description: Strict Mode - arguments object is immutable in eval'ed functions
flags: [onlyStrict]
---*/
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
---*/
function _10_5_7_b_2_fun() {
arguments[7] = 12;
return arguments[7] === 12;
};
function _10_5_7_b_2_fun() {
arguments[7] = 12;
return arguments[7] === 12;
};
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
---*/
function _10_5_7_b_3_fun() {
arguments[1] = 12;
return arguments[0] === 30 && arguments[1] === 12;
};
function _10_5_7_b_3_fun() {
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');

View File

@ -7,11 +7,11 @@ description: >
Deleting property of the arguments object successful under strict mode
---*/
function _10_5_7_b_4_fun() {
var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12;
delete arguments[1];
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;
};
function _10_5_7_b_4_fun() {
var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12;
delete arguments[1];
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;
};
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]
---*/
function foo(a,b,c)
{
a = 1; b = 'str'; c = 2.1;
return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1);
}
function foo(a,b,c)
{
a = 1; b = 'str'; c = 2.1;
return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1);
}
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]
---*/
function foo(a,b,c)
{
a = 1; b = 'str'; c = 2.1;
if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1)
return true;
}
function foo(a,b,c)
{
a = 1; b = 'str'; c = 2.1;
if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1)
return 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]
---*/
function foo(a,b,c)
{
arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1;
if(1 === a && 'str' === b && 2.1 === c)
return true;
}
function foo(a,b,c)
{
arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1;
if(1 === a && 'str' === b && 2.1 === c)
return true;
}
assert(foo(10,'sss',1), 'foo(10,"sss",1) !== true');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,5 +16,5 @@ function f() {
return "a";
}
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)) {
throw "'this' had incorrect value!";
throw "'this' had incorrect value!";
}

View File

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

View File

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

View File

@ -8,7 +8,7 @@ description: >
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((5).x == 5, '(5).x == 5');

View File

@ -9,6 +9,6 @@ description: >
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');

View File

@ -12,7 +12,7 @@ description: >
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(typeof (5).x, "object", 'typeof (5).x');

View File

@ -12,6 +12,6 @@ description: >
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');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,4 +13,4 @@ description: >
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]
---*/
assert.throws(SyntaxError, function() {
eval("'use strict'; function _13_0_7_fun() {eval = 42;};");
_13_0_7_fun();
eval("'use strict'; function _13_0_7_fun() {eval = 42;};");
_13_0_7_fun();
});

View File

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

View File

@ -16,5 +16,5 @@ flags: [noStrict]
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]
---*/
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
eval("'use strict'; function arguments() { };")
eval("'use strict'; function arguments() { };")
});

View File

@ -14,7 +14,6 @@ description: >
flags: [onlyStrict]
---*/
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]
---*/
var _13_1_41_s = {};
var _13_1_41_s = {};
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.
---*/
var foo = function () {
this.caller = 12;
}
var obj = new foo();
var foo = function () {
this.caller = 12;
}
var obj = new foo();
assert.sameValue(obj.caller, 12, 'obj.caller');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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