diff --git a/test/language/function-code/10.4.3-1-1-s.js b/test/language/function-code/10.4.3-1-1-s.js index 1ad2ea81f7..b7223ac668 100644 --- a/test/language/function-code/10.4.3-1-1-s.js +++ b/test/language/function-code/10.4.3-1-1-s.js @@ -5,11 +5,8 @@ es5id: 10.4.3-1-1-s description: this is not coerced to an object in strict mode (Number) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; @@ -22,6 +19,5 @@ function testcase() { } - return foo.call(1) === 'number' && bar.call(1) === 'object'; - } -runTestCase(testcase); +assert.sameValue(foo.call(1), 'number', 'foo.call(1)'); +assert.sameValue(bar.call(1), 'object', 'bar.call(1)'); diff --git a/test/language/function-code/10.4.3-1-10-s.js b/test/language/function-code/10.4.3-1-10-s.js index 85ad2cd075..98f9af6c68 100644 --- a/test/language/function-code/10.4.3-1-10-s.js +++ b/test/language/function-code/10.4.3-1-10-s.js @@ -7,14 +7,11 @@ description: > Strict Mode - checking 'this' (FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = function () { "use strict"; return typeof this; } -return f() === "undefined"; -} -runTestCase(testcase); + +assert.sameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-100-s.js b/test/language/function-code/10.4.3-1-100-s.js index 7613d4ed41..94d6a7ccf1 100644 --- a/test/language/function-code/10.4.3-1-100-s.js +++ b/test/language/function-code/10.4.3-1-100-s.js @@ -6,10 +6,8 @@ es5id: 10.4.3-1-100-s description: > Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace) -includes: [runTestCase.js] ---*/ -function testcase() { var x = 3; function f() { @@ -17,6 +15,6 @@ function f() { x = this; return "a"; } -return ("ab".replace("b", f)==="aa") && (x===undefined); -} -runTestCase(testcase); + +assert.sameValue("ab".replace("b", f), "aa", '"ab".replace("b", f)'); +assert.sameValue(x, undefined, 'x'); diff --git a/test/language/function-code/10.4.3-1-13-s.js b/test/language/function-code/10.4.3-1-13-s.js index 13201b2b7f..2234d56bb7 100644 --- a/test/language/function-code/10.4.3-1-13-s.js +++ b/test/language/function-code/10.4.3-1-13-s.js @@ -7,11 +7,8 @@ description: > Strict Mode - checking 'this' (Function constructor defined within strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = Function("return typeof this;"); -return f() !== "undefined"; -} -runTestCase(testcase); + +assert.notSameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-14-s.js b/test/language/function-code/10.4.3-1-14-s.js index 97a2de70aa..4290d4cb92 100644 --- a/test/language/function-code/10.4.3-1-14-s.js +++ b/test/language/function-code/10.4.3-1-14-s.js @@ -7,11 +7,8 @@ description: > Strict Mode - checking 'this' (Function constructor includes strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = Function("\"use strict\";\nreturn typeof this;"); -return f() === "undefined"; -} -runTestCase(testcase); + +assert.sameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-15-s.js b/test/language/function-code/10.4.3-1-15-s.js index 0564197cf3..4908200cd5 100644 --- a/test/language/function-code/10.4.3-1-15-s.js +++ b/test/language/function-code/10.4.3-1-15-s.js @@ -7,11 +7,8 @@ description: > Strict Mode - checking 'this' (New'ed Function constructor defined within strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = new Function("return typeof this;"); -return f() !== "undefined"; -} -runTestCase(testcase); + +assert.notSameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-16-s.js b/test/language/function-code/10.4.3-1-16-s.js index a443e6370a..0aa10ebcf9 100644 --- a/test/language/function-code/10.4.3-1-16-s.js +++ b/test/language/function-code/10.4.3-1-16-s.js @@ -7,11 +7,8 @@ description: > Strict Mode - checking 'this' (New'ed Function constructor includes strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = new Function("\"use strict\";\nreturn typeof this;"); -return f() === "undefined"; -} -runTestCase(testcase); + +assert.sameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-2-s.js b/test/language/function-code/10.4.3-1-2-s.js index ad0bfe1d3e..fea410f049 100644 --- a/test/language/function-code/10.4.3-1-2-s.js +++ b/test/language/function-code/10.4.3-1-2-s.js @@ -5,11 +5,8 @@ es5id: 10.4.3-1-2-s description: this is not coerced to an object in strict mode (string) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; @@ -22,6 +19,5 @@ function testcase() { } - return foo.call('1') === 'string' && bar.call('1') === 'object'; - } -runTestCase(testcase); +assert.sameValue(foo.call('1'), 'string', 'foo.call("1")'); +assert.sameValue(bar.call('1'), 'object', 'bar.call("1")'); diff --git a/test/language/function-code/10.4.3-1-21-s.js b/test/language/function-code/10.4.3-1-21-s.js index 78d622a857..5182c995dd 100644 --- a/test/language/function-code/10.4.3-1-21-s.js +++ b/test/language/function-code/10.4.3-1-21-s.js @@ -7,15 +7,12 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionDeclaration defined within strict mode) flags: [onlyStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f() { return this; } -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); + +assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-22-s.js b/test/language/function-code/10.4.3-1-22-s.js index 8a2e772b7a..2e836e2ecf 100644 --- a/test/language/function-code/10.4.3-1-22-s.js +++ b/test/language/function-code/10.4.3-1-22-s.js @@ -7,17 +7,13 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionDeclaration includes strict directive prologue) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f() { "use strict"; return this; } -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); +assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-23-s.js b/test/language/function-code/10.4.3-1-23-s.js index bf909a8ff9..68ca1f1597 100644 --- a/test/language/function-code/10.4.3-1-23-s.js +++ b/test/language/function-code/10.4.3-1-23-s.js @@ -7,16 +7,12 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var f = function () { return this; } -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); +assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-24-s.js b/test/language/function-code/10.4.3-1-24-s.js index a30f3bd310..1f42d08f8e 100644 --- a/test/language/function-code/10.4.3-1-24-s.js +++ b/test/language/function-code/10.4.3-1-24-s.js @@ -7,16 +7,13 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var f = function () { "use strict"; return this; } -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); + +assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-25-s.js b/test/language/function-code/10.4.3-1-25-s.js index 2b92f82ac6..7159330441 100644 --- a/test/language/function-code/10.4.3-1-25-s.js +++ b/test/language/function-code/10.4.3-1-25-s.js @@ -7,15 +7,12 @@ description: > Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var obj = new (function () { return this; }); -return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); -} -runTestCase(testcase); + +assert.notSameValue(obj, fnGlobalObject(), 'obj'); +assert.notSameValue((typeof obj), "undefined", '(typeof obj)'); diff --git a/test/language/function-code/10.4.3-1-26-s.js b/test/language/function-code/10.4.3-1-26-s.js index 12533e37ea..fd7135282a 100644 --- a/test/language/function-code/10.4.3-1-26-s.js +++ b/test/language/function-code/10.4.3-1-26-s.js @@ -7,16 +7,13 @@ description: > Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var obj = new (function () { "use strict"; return this; }); -return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); -} -runTestCase(testcase); + +assert.notSameValue(obj, fnGlobalObject(), 'obj'); +assert.notSameValue((typeof obj), "undefined", '(typeof obj)'); diff --git a/test/language/function-code/10.4.3-1-27-s.js b/test/language/function-code/10.4.3-1-27-s.js index 41b6c29fa8..1e23f0e6b7 100644 --- a/test/language/function-code/10.4.3-1-27-s.js +++ b/test/language/function-code/10.4.3-1-27-s.js @@ -7,16 +7,13 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f1() { function f() { return typeof this; } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-28-s.js b/test/language/function-code/10.4.3-1-28-s.js index 3dd3e80e40..d75ddd6d17 100644 --- a/test/language/function-code/10.4.3-1-28-s.js +++ b/test/language/function-code/10.4.3-1-28-s.js @@ -7,16 +7,13 @@ description: > Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration inside strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f1() { var f = function () { return typeof this; } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-29-s.js b/test/language/function-code/10.4.3-1-29-s.js index d975eb41fa..0204d703b0 100644 --- a/test/language/function-code/10.4.3-1-29-s.js +++ b/test/language/function-code/10.4.3-1-29-s.js @@ -7,15 +7,12 @@ description: > Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f1() { return ((function () { return typeof this; })()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-3-s.js b/test/language/function-code/10.4.3-1-3-s.js index a3c6a42c24..e832c4a4d6 100644 --- a/test/language/function-code/10.4.3-1-3-s.js +++ b/test/language/function-code/10.4.3-1-3-s.js @@ -5,11 +5,8 @@ es5id: 10.4.3-1-3-s description: this is not coerced to an object in strict mode (undefined) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; @@ -20,6 +17,6 @@ function testcase() { { return typeof(this); } - return foo.call(undefined) === 'undefined' && bar.call() === 'object'; - } -runTestCase(testcase); + +assert.sameValue(foo.call(undefined), 'undefined', 'foo.call(undefined)'); +assert.sameValue(bar.call(), 'object', 'bar.call()'); diff --git a/test/language/function-code/10.4.3-1-30-s.js b/test/language/function-code/10.4.3-1-30-s.js index 5969bd109c..1ff3d68353 100644 --- a/test/language/function-code/10.4.3-1-30-s.js +++ b/test/language/function-code/10.4.3-1-30-s.js @@ -7,16 +7,13 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression inside strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f1 = function () { function f() { return typeof this; } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-31-s.js b/test/language/function-code/10.4.3-1-31-s.js index 6bd24e99c3..5b8a33cd68 100644 --- a/test/language/function-code/10.4.3-1-31-s.js +++ b/test/language/function-code/10.4.3-1-31-s.js @@ -7,16 +7,13 @@ description: > Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression inside strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f1 = function () { var f = function () { return typeof this; } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-32-s.js b/test/language/function-code/10.4.3-1-32-s.js index d095b0a2f9..eb64609462 100644 --- a/test/language/function-code/10.4.3-1-32-s.js +++ b/test/language/function-code/10.4.3-1-32-s.js @@ -7,15 +7,12 @@ description: > Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f1 = function () { return ((function () { return typeof this; })()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-36-s.js b/test/language/function-code/10.4.3-1-36-s.js index d50999a594..c58db747cc 100644 --- a/test/language/function-code/10.4.3-1-36-s.js +++ b/test/language/function-code/10.4.3-1-36-s.js @@ -7,10 +7,8 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f1() { "use strict"; function f() { @@ -18,6 +16,5 @@ function f1() { } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-37-s.js b/test/language/function-code/10.4.3-1-37-s.js index 79e2a3e484..539d7aa436 100644 --- a/test/language/function-code/10.4.3-1-37-s.js +++ b/test/language/function-code/10.4.3-1-37-s.js @@ -7,10 +7,8 @@ description: > Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f1() { "use strict"; var f = function () { @@ -18,6 +16,5 @@ function f1() { } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-38-s.js b/test/language/function-code/10.4.3-1-38-s.js index 80bab409ab..4d4cac2f7d 100644 --- a/test/language/function-code/10.4.3-1-38-s.js +++ b/test/language/function-code/10.4.3-1-38-s.js @@ -8,16 +8,13 @@ description: > defined within a FunctionDeclaration with a strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f1() { "use strict"; return ((function () { return typeof this; })()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-39-s.js b/test/language/function-code/10.4.3-1-39-s.js index 2b886d01e4..90dfb50f27 100644 --- a/test/language/function-code/10.4.3-1-39-s.js +++ b/test/language/function-code/10.4.3-1-39-s.js @@ -7,10 +7,8 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f1 = function () { "use strict"; function f() { @@ -18,6 +16,5 @@ var f1 = function () { } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-4-s.js b/test/language/function-code/10.4.3-1-4-s.js index 6de018f5c4..e942576a01 100644 --- a/test/language/function-code/10.4.3-1-4-s.js +++ b/test/language/function-code/10.4.3-1-4-s.js @@ -5,11 +5,8 @@ es5id: 10.4.3-1-4-s description: this is not coerced to an object in strict mode (boolean) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; @@ -22,6 +19,5 @@ function testcase() { } - return foo.call(true) === 'boolean' && bar.call(true) === 'object'; - } -runTestCase(testcase); +assert.sameValue(foo.call(true), 'boolean', 'foo.call(true)'); +assert.sameValue(bar.call(true), 'object', 'bar.call(true)'); diff --git a/test/language/function-code/10.4.3-1-40-s.js b/test/language/function-code/10.4.3-1-40-s.js index d71e43b5ab..2eac1d7859 100644 --- a/test/language/function-code/10.4.3-1-40-s.js +++ b/test/language/function-code/10.4.3-1-40-s.js @@ -7,10 +7,8 @@ description: > Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression with a strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f1 = function () { "use strict"; var f = function () { @@ -18,6 +16,5 @@ var f1 = function () { } return (f()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-41-s.js b/test/language/function-code/10.4.3-1-41-s.js index 4a9b9386f9..16ca1bb7ee 100644 --- a/test/language/function-code/10.4.3-1-41-s.js +++ b/test/language/function-code/10.4.3-1-41-s.js @@ -8,16 +8,13 @@ description: > defined within a FunctionExpression with a strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f1 = function () { "use strict"; return ((function () { return typeof this; })()==="undefined") && ((typeof this)==="undefined"); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-45-s.js b/test/language/function-code/10.4.3-1-45-s.js index 3e46e67e80..5d8577b93e 100644 --- a/test/language/function-code/10.4.3-1-45-s.js +++ b/test/language/function-code/10.4.3-1-45-s.js @@ -7,12 +7,9 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f1() { function f() { "use strict"; @@ -20,6 +17,5 @@ function f1() { } return (f()==="undefined") && (this===fnGlobalObject()); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-46-s.js b/test/language/function-code/10.4.3-1-46-s.js index af4a06c4b5..a1b41beec9 100644 --- a/test/language/function-code/10.4.3-1-46-s.js +++ b/test/language/function-code/10.4.3-1-46-s.js @@ -7,12 +7,9 @@ description: > Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f1() { var f = function () { "use strict"; @@ -20,6 +17,5 @@ function f1() { } return (f()==="undefined") && (this===fnGlobalObject()); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-47-s.js b/test/language/function-code/10.4.3-1-47-s.js index 10f6b26268..190a71b4b8 100644 --- a/test/language/function-code/10.4.3-1-47-s.js +++ b/test/language/function-code/10.4.3-1-47-s.js @@ -7,18 +7,14 @@ description: > Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f1() { return ((function () { "use strict"; return typeof this; })()==="undefined") && (this===fnGlobalObject()); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-48-s.js b/test/language/function-code/10.4.3-1-48-s.js index 9fe714908e..d71463da11 100644 --- a/test/language/function-code/10.4.3-1-48-s.js +++ b/test/language/function-code/10.4.3-1-48-s.js @@ -7,12 +7,9 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var f1 = function () { function f() { "use strict"; @@ -20,6 +17,5 @@ var f1 = function () { } return (f()==="undefined") && (this===fnGlobalObject()); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-49-s.js b/test/language/function-code/10.4.3-1-49-s.js index ed3e398417..ecd6d827e4 100644 --- a/test/language/function-code/10.4.3-1-49-s.js +++ b/test/language/function-code/10.4.3-1-49-s.js @@ -7,12 +7,9 @@ description: > Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var f1 = function () { var f = function () { "use strict"; @@ -20,6 +17,5 @@ var f1 = function () { } return (f()==="undefined") && (this===fnGlobalObject()); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-5-s.js b/test/language/function-code/10.4.3-1-5-s.js index 37b40c7d21..d3ea4d11be 100644 --- a/test/language/function-code/10.4.3-1-5-s.js +++ b/test/language/function-code/10.4.3-1-5-s.js @@ -4,11 +4,8 @@ /*--- es5id: 10.4.3-1-5-s description: this is not coerced to an object (function) -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; @@ -24,6 +21,5 @@ function testcase() { { } - return foo.call(foobar) === 'function' && bar.call(foobar) === 'function'; - } -runTestCase(testcase); +assert.sameValue(foo.call(foobar), 'function', 'foo.call(foobar)'); +assert.sameValue(bar.call(foobar), 'function', 'bar.call(foobar)'); diff --git a/test/language/function-code/10.4.3-1-50-s.js b/test/language/function-code/10.4.3-1-50-s.js index 96e85d984d..f7e864c20a 100644 --- a/test/language/function-code/10.4.3-1-50-s.js +++ b/test/language/function-code/10.4.3-1-50-s.js @@ -7,18 +7,14 @@ description: > Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { var f1 = function () { return ((function () { "use strict"; return typeof this; })()==="undefined") && (this===fnGlobalObject()); } -return f1(); -} -runTestCase(testcase); + +assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-54-s.js b/test/language/function-code/10.4.3-1-54-s.js index d1b47bdefe..592f5ef35d 100644 --- a/test/language/function-code/10.4.3-1-54-s.js +++ b/test/language/function-code/10.4.3-1-54-s.js @@ -5,11 +5,8 @@ es5id: 10.4.3-1-54-s description: > checking 'this' (Literal getter) -includes: [runTestCase.js] ---*/ -function testcase() { var o = { get foo() { return this; } } -return o.foo===o; -} -runTestCase(testcase); + +assert.sameValue(o.foo, o, 'o.foo'); diff --git a/test/language/function-code/10.4.3-1-55-s.js b/test/language/function-code/10.4.3-1-55-s.js index b5039b1ec7..79cc24c61e 100644 --- a/test/language/function-code/10.4.3-1-55-s.js +++ b/test/language/function-code/10.4.3-1-55-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-55-s description: > Strict Mode - checking 'this' (Literal getter includes strict directive prologue) -includes: [runTestCase.js] ---*/ -function testcase() { var o = { get foo() { "use strict"; return this; } } -return o.foo===o; -} -runTestCase(testcase); + +assert.sameValue(o.foo, o, 'o.foo'); diff --git a/test/language/function-code/10.4.3-1-56-s.js b/test/language/function-code/10.4.3-1-56-s.js index 358b6a23bd..c70fde0960 100644 --- a/test/language/function-code/10.4.3-1-56-s.js +++ b/test/language/function-code/10.4.3-1-56-s.js @@ -5,13 +5,10 @@ es5id: 10.4.3-1-56-s description: > checking 'this' (Literal setter) -includes: [runTestCase.js] ---*/ -function testcase() { var x = 2; var o = { set foo(stuff) { x=this; } } o.foo = 3; -return x===o; -} -runTestCase(testcase); + +assert.sameValue(x, o, 'x'); diff --git a/test/language/function-code/10.4.3-1-57-s.js b/test/language/function-code/10.4.3-1-57-s.js index 3ead0e7afc..8bae8e218b 100644 --- a/test/language/function-code/10.4.3-1-57-s.js +++ b/test/language/function-code/10.4.3-1-57-s.js @@ -5,13 +5,10 @@ es5id: 10.4.3-1-57-s description: > checking 'this' (Literal setter includes strict directive prologue) -includes: [runTestCase.js] ---*/ -function testcase() { var x = 2; var o = { set foo(stuff) { "use strict"; x=this; } } o.foo = 3; -return x===o; -} -runTestCase(testcase); + +assert.sameValue(x, o, 'x'); diff --git a/test/language/function-code/10.4.3-1-58-s.js b/test/language/function-code/10.4.3-1-58-s.js index 8b9811dcde..f4be2ff9bd 100644 --- a/test/language/function-code/10.4.3-1-58-s.js +++ b/test/language/function-code/10.4.3-1-58-s.js @@ -5,12 +5,9 @@ es5id: 10.4.3-1-58-s description: > checking 'this' (Injected getter) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; Object.defineProperty(o, "foo", { get: function() { return this; } }); -return o.foo===o; -} -runTestCase(testcase); + +assert.sameValue(o.foo, o, 'o.foo'); diff --git a/test/language/function-code/10.4.3-1-59-s.js b/test/language/function-code/10.4.3-1-59-s.js index 94cb74ea58..8814d38a52 100644 --- a/test/language/function-code/10.4.3-1-59-s.js +++ b/test/language/function-code/10.4.3-1-59-s.js @@ -5,12 +5,9 @@ es5id: 10.4.3-1-59-s description: > checking 'this' (Injected getter includes strict directive prologue) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); -return o.foo===o; -} -runTestCase(testcase); + +assert.sameValue(o.foo, o, 'o.foo'); diff --git a/test/language/function-code/10.4.3-1-60-s.js b/test/language/function-code/10.4.3-1-60-s.js index 29814cf29b..4555c31fbe 100644 --- a/test/language/function-code/10.4.3-1-60-s.js +++ b/test/language/function-code/10.4.3-1-60-s.js @@ -5,14 +5,11 @@ es5id: 10.4.3-1-60-s description: > checking 'this' (Injected setter) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; var x = 2; Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); o.foo = 3; -return x===o; -} -runTestCase(testcase); + +assert.sameValue(x, o, 'x'); diff --git a/test/language/function-code/10.4.3-1-61-s.js b/test/language/function-code/10.4.3-1-61-s.js index fe3c948505..c579bf3cb2 100644 --- a/test/language/function-code/10.4.3-1-61-s.js +++ b/test/language/function-code/10.4.3-1-61-s.js @@ -5,14 +5,11 @@ es5id: 10.4.3-1-61-s description: > checking 'this' (Injected setter includes strict directive prologue) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; var x = 2; Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); o.foo = 3; -return x===o; -} -runTestCase(testcase); + +assert.sameValue(x, o, 'x'); diff --git a/test/language/function-code/10.4.3-1-62-s.js b/test/language/function-code/10.4.3-1-62-s.js index 564a630840..d67b262822 100644 --- a/test/language/function-code/10.4.3-1-62-s.js +++ b/test/language/function-code/10.4.3-1-62-s.js @@ -6,12 +6,9 @@ es5id: 10.4.3-1-62-s description: > checking 'this' (strict function declaration called by non-strict function declaration) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this;}; function foo() { return f();} -return foo()===undefined; -} -runTestCase(testcase); + +assert.sameValue(foo(), undefined, 'foo()'); diff --git a/test/language/function-code/10.4.3-1-66-s.js b/test/language/function-code/10.4.3-1-66-s.js index 7da2d21f75..cb49b60ac4 100644 --- a/test/language/function-code/10.4.3-1-66-s.js +++ b/test/language/function-code/10.4.3-1-66-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-66-s description: > checking 'this' (strict function declaration called by Function.prototype.apply()) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===undefined;}; -return f.apply(); -} -runTestCase(testcase); + +assert(f.apply(), 'f.apply() !== true'); diff --git a/test/language/function-code/10.4.3-1-67-s.js b/test/language/function-code/10.4.3-1-67-s.js index 32b1fab38e..64df9085a5 100644 --- a/test/language/function-code/10.4.3-1-67-s.js +++ b/test/language/function-code/10.4.3-1-67-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-67-s description: > checking 'this' (strict function declaration called by Function.prototype.apply(null)) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===null;}; -return f.apply(null); -} -runTestCase(testcase); + +assert(f.apply(null), 'f.apply(null) !== true'); diff --git a/test/language/function-code/10.4.3-1-68-s.js b/test/language/function-code/10.4.3-1-68-s.js index 1eb1e93b25..73e1ff59c1 100644 --- a/test/language/function-code/10.4.3-1-68-s.js +++ b/test/language/function-code/10.4.3-1-68-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-68-s description: > checking 'this' (strict function declaration called by Function.prototype.apply(undefined)) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===undefined;}; -return f.apply(undefined); -} -runTestCase(testcase); + +assert(f.apply(undefined), 'f.apply(undefined) !== true'); diff --git a/test/language/function-code/10.4.3-1-69-s.js b/test/language/function-code/10.4.3-1-69-s.js index 4b65b33774..48d20a8676 100644 --- a/test/language/function-code/10.4.3-1-69-s.js +++ b/test/language/function-code/10.4.3-1-69-s.js @@ -6,12 +6,9 @@ es5id: 10.4.3-1-69-s description: > checking 'this' (strict function declaration called by Function.prototype.apply(someObject)) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; function f() { "use strict"; return this===o;}; -return f.apply(o); -} -runTestCase(testcase); + +assert(f.apply(o), 'f.apply(o) !== true'); diff --git a/test/language/function-code/10.4.3-1-7-s.js b/test/language/function-code/10.4.3-1-7-s.js index 2c9d796076..10de10be61 100644 --- a/test/language/function-code/10.4.3-1-7-s.js +++ b/test/language/function-code/10.4.3-1-7-s.js @@ -7,13 +7,10 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration defined within strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f() { return typeof this; } -return f() === "undefined"; -} -runTestCase(testcase); + +assert.sameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-70-s.js b/test/language/function-code/10.4.3-1-70-s.js index 8a73071cc0..b989b66f11 100644 --- a/test/language/function-code/10.4.3-1-70-s.js +++ b/test/language/function-code/10.4.3-1-70-s.js @@ -6,13 +6,9 @@ es5id: 10.4.3-1-70-s description: > checking 'this' (strict function declaration called by Function.prototype.apply(globalObject)) -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f() { "use strict"; return this;}; -return f.apply(fnGlobalObject()) === fnGlobalObject(); -} -runTestCase(testcase); + +assert.sameValue(f.apply(fnGlobalObject()), fnGlobalObject(), 'f.apply(fnGlobalObject())'); diff --git a/test/language/function-code/10.4.3-1-71-s.js b/test/language/function-code/10.4.3-1-71-s.js index 60e9486f82..1ffccd0dcf 100644 --- a/test/language/function-code/10.4.3-1-71-s.js +++ b/test/language/function-code/10.4.3-1-71-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-71-s description: > checking 'this' (strict function declaration called by Function.prototype.call()) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===undefined;}; -return f.call(); -} -runTestCase(testcase); + +assert(f.call(), 'f.call() !== true'); diff --git a/test/language/function-code/10.4.3-1-72-s.js b/test/language/function-code/10.4.3-1-72-s.js index b22169d494..7155daf6fb 100644 --- a/test/language/function-code/10.4.3-1-72-s.js +++ b/test/language/function-code/10.4.3-1-72-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-72-s description: > checking 'this' (strict function declaration called by Function.prototype.call(null)) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===null;}; -return f.call(null); -} -runTestCase(testcase); + +assert(f.call(null), 'f.call(null) !== true'); diff --git a/test/language/function-code/10.4.3-1-73-s.js b/test/language/function-code/10.4.3-1-73-s.js index 9e0e41e81b..d4ed860330 100644 --- a/test/language/function-code/10.4.3-1-73-s.js +++ b/test/language/function-code/10.4.3-1-73-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-73-s description: > checking 'this' (strict function declaration called by Function.prototype.call(undefined)) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===undefined;}; -return f.call(undefined); -} -runTestCase(testcase); + +assert(f.call(undefined), 'f.call(undefined) !== true'); diff --git a/test/language/function-code/10.4.3-1-74-s.js b/test/language/function-code/10.4.3-1-74-s.js index 8f6e3e58bb..4b66dddc51 100644 --- a/test/language/function-code/10.4.3-1-74-s.js +++ b/test/language/function-code/10.4.3-1-74-s.js @@ -6,12 +6,9 @@ es5id: 10.4.3-1-74-s description: > checking 'this' (strict function declaration called by Function.prototype.call(someObject)) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; function f() { "use strict"; return this===o;}; -return f.call(o); -} -runTestCase(testcase); + +assert(f.call(o), 'f.call(o) !== true'); diff --git a/test/language/function-code/10.4.3-1-75-s.js b/test/language/function-code/10.4.3-1-75-s.js index a8d7d36544..255480d520 100644 --- a/test/language/function-code/10.4.3-1-75-s.js +++ b/test/language/function-code/10.4.3-1-75-s.js @@ -6,13 +6,9 @@ es5id: 10.4.3-1-75-s description: > checking 'this' (strict function declaration called by Function.prototype.call(globalObject)) -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f() { "use strict"; return this;}; -return f.call(fnGlobalObject()) === fnGlobalObject(); -} -runTestCase(testcase); + +assert.sameValue(f.call(fnGlobalObject()), fnGlobalObject(), 'f.call(fnGlobalObject())'); diff --git a/test/language/function-code/10.4.3-1-76-s.js b/test/language/function-code/10.4.3-1-76-s.js index 988056566a..a685de24fd 100644 --- a/test/language/function-code/10.4.3-1-76-s.js +++ b/test/language/function-code/10.4.3-1-76-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-76-s description: > checking 'this' (strict function declaration called by Function.prototype.bind()()) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===undefined;}; -return f.bind()(); -} -runTestCase(testcase); + +assert(f.bind()(), 'f.bind()() !== true'); diff --git a/test/language/function-code/10.4.3-1-77-s.js b/test/language/function-code/10.4.3-1-77-s.js index 3476c23916..59e640b0ad 100644 --- a/test/language/function-code/10.4.3-1-77-s.js +++ b/test/language/function-code/10.4.3-1-77-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-77-s description: > checking 'this' (strict function declaration called by Function.prototype.bind(null)()) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===null;}; -return f.bind(null)(); -} -runTestCase(testcase); + +assert(f.bind(null)(), 'f.bind(null)() !== true'); diff --git a/test/language/function-code/10.4.3-1-78-s.js b/test/language/function-code/10.4.3-1-78-s.js index ea1b18ef38..7ac9171a70 100644 --- a/test/language/function-code/10.4.3-1-78-s.js +++ b/test/language/function-code/10.4.3-1-78-s.js @@ -6,11 +6,8 @@ es5id: 10.4.3-1-78-s description: > checking 'this' (strict function declaration called by Function.prototype.bind(undefined)()) -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return this===undefined;}; -return f.bind(undefined)(); -} -runTestCase(testcase); + +assert(f.bind(undefined)(), 'f.bind(undefined)() !== true'); diff --git a/test/language/function-code/10.4.3-1-79-s.js b/test/language/function-code/10.4.3-1-79-s.js index eb76175554..a6fba00cac 100644 --- a/test/language/function-code/10.4.3-1-79-s.js +++ b/test/language/function-code/10.4.3-1-79-s.js @@ -6,12 +6,9 @@ es5id: 10.4.3-1-79-s description: > checking 'this' (strict function declaration called by Function.prototype.bind(someObject)()) -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; function f() { "use strict"; return this===o;}; -return f.bind(o)(); -} -runTestCase(testcase); + +assert(f.bind(o)(), 'f.bind(o)() !== true'); diff --git a/test/language/function-code/10.4.3-1-8-s.js b/test/language/function-code/10.4.3-1-8-s.js index 27f652b597..e0079a0408 100644 --- a/test/language/function-code/10.4.3-1-8-s.js +++ b/test/language/function-code/10.4.3-1-8-s.js @@ -7,14 +7,11 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration includes strict directive prologue) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f() { "use strict"; return typeof this; } -return f() === "undefined"; -} -runTestCase(testcase); + +assert.sameValue(f(), "undefined", 'f()'); diff --git a/test/language/function-code/10.4.3-1-80-s.js b/test/language/function-code/10.4.3-1-80-s.js index 2ba8d02c2f..9d1335707b 100644 --- a/test/language/function-code/10.4.3-1-80-s.js +++ b/test/language/function-code/10.4.3-1-80-s.js @@ -7,13 +7,9 @@ description: > Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(globalObject)()) flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { function f() { "use strict"; return this;}; -return f.bind(fnGlobalObject())() === fnGlobalObject(); -} -runTestCase(testcase); + +assert.sameValue(f.bind(fnGlobalObject())(), fnGlobalObject(), 'f.bind(fnGlobalObject())()'); diff --git a/test/language/function-code/10.4.3-1-81-s.js b/test/language/function-code/10.4.3-1-81-s.js index e9626d6663..b8eb15e01b 100644 --- a/test/language/function-code/10.4.3-1-81-s.js +++ b/test/language/function-code/10.4.3-1-81-s.js @@ -7,12 +7,9 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict function declaration) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function f() { return this!==undefined;}; function foo() { "use strict"; return f();} -return foo(); -} -runTestCase(testcase); + +assert(foo(), 'foo() !== true'); diff --git a/test/language/function-code/10.4.3-1-9-s.js b/test/language/function-code/10.4.3-1-9-s.js index 15ad701541..ebaf07ab2f 100644 --- a/test/language/function-code/10.4.3-1-9-s.js +++ b/test/language/function-code/10.4.3-1-9-s.js @@ -7,13 +7,10 @@ description: > Strict Mode - checking 'this' (FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = function () { return typeof this; } -return f() === "undefined"; -} -runTestCase(testcase); + +assert.sameValue(f(), "undefined", 'f()');