diff --git a/test/language/statements/break/12.8-1.js b/test/language/statements/break/12.8-1.js index eb32c31af4..82137439e2 100644 --- a/test/language/statements/break/12.8-1.js +++ b/test/language/statements/break/12.8-1.js @@ -6,10 +6,8 @@ es5id: 12.8-1 description: > The break Statement - a break statement without an identifier may have a LineTerminator before the semi-colon -includes: [runTestCase.js] ---*/ -function testcase() { var sum = 0; for (var i = 1; i <= 10; i++) { if (i === 6) { @@ -18,6 +16,5 @@ function testcase() { } sum += i; } - return sum === 15; - } -runTestCase(testcase); + +assert.sameValue(sum, 15, 'sum'); diff --git a/test/language/statements/continue/12.7-1.js b/test/language/statements/continue/12.7-1.js index d9092bc964..b97021377d 100644 --- a/test/language/statements/continue/12.7-1.js +++ b/test/language/statements/continue/12.7-1.js @@ -6,16 +6,13 @@ es5id: 12.7-1 description: > The continue Statement - a continue statement without an identifier may have a LineTerminator before the semi-colon -includes: [runTestCase.js] ---*/ -function testcase() { var sum = 0; for (var i = 1; i <= 10; i++) { continue ; sum += i; } - return sum === 0; - } -runTestCase(testcase); + +assert.sameValue(sum, 0, 'sum'); diff --git a/test/language/statements/for-in/12.6.4-1.js b/test/language/statements/for-in/12.6.4-1.js index 71a7ad5ccb..92284ee3c1 100644 --- a/test/language/statements/for-in/12.6.4-1.js +++ b/test/language/statements/for-in/12.6.4-1.js @@ -6,10 +6,8 @@ es5id: 12.6.4-1 description: > The for-in Statement - a property name must not be visited more than once in any enumeration. -includes: [runTestCase.js] ---*/ -function testcase() { var obj = { prop1: "abc", prop2: "bbc", prop3: "cnn" }; var countProp1 = 0; @@ -29,6 +27,7 @@ function testcase() { } } } - return countProp1 === 1 && countProp2 === 1 && countProp3 === 1; - } -runTestCase(testcase); + +assert.sameValue(countProp1, 1, 'countProp1'); +assert.sameValue(countProp2, 1, 'countProp2'); +assert.sameValue(countProp3, 1, 'countProp3'); diff --git a/test/language/statements/for-in/12.6.4-2.js b/test/language/statements/for-in/12.6.4-2.js index 2fc274aa32..f2992054c4 100644 --- a/test/language/statements/for-in/12.6.4-2.js +++ b/test/language/statements/for-in/12.6.4-2.js @@ -7,10 +7,8 @@ description: > The for-in Statement - the values of [[Enumerable]] attributes are not considered when determining if a property of a prototype object is shadowed by a previous object on the prototype chain -includes: [runTestCase.js] ---*/ -function testcase() { var proto = { prop: "enumerableValue" }; @@ -32,6 +30,5 @@ function testcase() { accessedProp = true; } } - return !accessedProp; - } -runTestCase(testcase); + +assert.sameValue(accessedProp, false, 'accessedProp'); diff --git a/test/language/statements/function/13.0-12-s.js b/test/language/statements/function/13.0-12-s.js index edae04cdf1..6443a087aa 100644 --- a/test/language/statements/function/13.0-12-s.js +++ b/test/language/statements/function/13.0-12-s.js @@ -11,13 +11,7 @@ description: > when a Function constructor is contained in strict mode code and the function constructor body is not strict flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var _13_0_12_fun = new Function(" ","eval = 42;"); _13_0_12_fun(); - return true; - - } -runTestCase(testcase); diff --git a/test/language/statements/function/13.1-2-2.js b/test/language/statements/function/13.1-2-2.js index 12c1eeaea6..c3e856734f 100644 --- a/test/language/statements/function/13.1-2-2.js +++ b/test/language/statements/function/13.1-2-2.js @@ -6,13 +6,7 @@ es5id: 13.1-2-2 description: > eval allowed as formal parameter name of a non-strict function expression -includes: [runTestCase.js] flags: [noStrict] ---*/ -function testcase() -{ eval("(function foo(eval){});"); - return true; - } -runTestCase(testcase); diff --git a/test/language/statements/function/13.2-1-s.js b/test/language/statements/function/13.2-1-s.js index ec7ae1bc84..3a239777bb 100644 --- a/test/language/statements/function/13.2-1-s.js +++ b/test/language/statements/function/13.2-1-s.js @@ -6,14 +6,11 @@ es5id: 13.2-1-s description: > StrictMode - Writing or reading from a property named 'caller' of function objects is allowed under both strict and normal modes. -includes: [runTestCase.js] ---*/ -function testcase() { var foo = function () { this.caller = 12; } var obj = new foo(); - return obj.caller === 12; - } -runTestCase(testcase); + +assert.sameValue(obj.caller, 12, 'obj.caller'); diff --git a/test/language/statements/return/12.9-1.js b/test/language/statements/return/12.9-1.js index 9a971ca0ad..c2f38544c6 100644 --- a/test/language/statements/return/12.9-1.js +++ b/test/language/statements/return/12.9-1.js @@ -6,10 +6,8 @@ es5id: 12.9-1 description: > The return Statement - a return statement without an expression may have a LineTerminator before the semi-colon -includes: [runTestCase.js] ---*/ -function testcase() { var sum = 0; (function innerTest() { for (var i = 1; i <= 10; i++) { @@ -20,6 +18,5 @@ function testcase() { sum += i; } })(); - return sum === 15; - } -runTestCase(testcase); + +assert.sameValue(sum, 15, 'sum'); diff --git a/test/language/statements/variable/12.2.1-10-s.js b/test/language/statements/variable/12.2.1-10-s.js index 971999ed09..726918d10c 100644 --- a/test/language/statements/variable/12.2.1-10-s.js +++ b/test/language/statements/variable/12.2.1-10-s.js @@ -4,12 +4,7 @@ /*--- es5id: 12.2.1-10-s description: "Strict Mode: an indirect eval assigning into 'eval' does not throw" -includes: [runTestCase.js] ---*/ -function testcase() { var s = eval; s('eval = 42;'); - return true; - } -runTestCase(testcase); diff --git a/test/language/statements/variable/12.2.1-5-s.js b/test/language/statements/variable/12.2.1-5-s.js index 33f7dab39a..5f7dee6243 100644 --- a/test/language/statements/variable/12.2.1-5-s.js +++ b/test/language/statements/variable/12.2.1-5-s.js @@ -5,11 +5,6 @@ es5id: 12.2.1-5-s description: > a Function declaring var named 'eval' does not throw SyntaxError -includes: [runTestCase.js] ---*/ -function testcase() { Function('var eval;'); - return true; - } -runTestCase(testcase); diff --git a/test/language/statements/variable/12.2.1-6-s.js b/test/language/statements/variable/12.2.1-6-s.js index 1fd3571b27..28980b317a 100644 --- a/test/language/statements/variable/12.2.1-6-s.js +++ b/test/language/statements/variable/12.2.1-6-s.js @@ -8,12 +8,7 @@ description: > if contained within strict mode and its body does not start with strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var f = Function('eval = 42;'); f(); - return true; - } -runTestCase(testcase); diff --git a/test/language/statements/with/12.10-0-1.js b/test/language/statements/with/12.10-0-1.js index 9f46c0c83f..99d94cf07c 100644 --- a/test/language/statements/with/12.10-0-1.js +++ b/test/language/statements/with/12.10-0-1.js @@ -6,11 +6,9 @@ es5id: 12.10-0-1 description: > with does not change declaration scope - vars in with are visible outside -includes: [runTestCase.js] flags: [noStrict] ---*/ -function testcase() { var o = {}; var f = function () { /* capture foo binding before executing with */ @@ -21,7 +19,4 @@ function testcase() { var foo = "12.10-0-1"; } - return f()==="12.10-0-1" - - } -runTestCase(testcase); +assert.sameValue(f(), "12.10-0-1", 'f()'); diff --git a/test/language/statements/with/12.10-0-3.js b/test/language/statements/with/12.10-0-3.js index 920491628a..36be6a87a1 100644 --- a/test/language/statements/with/12.10-0-3.js +++ b/test/language/statements/with/12.10-0-3.js @@ -4,11 +4,9 @@ /*--- es5id: 12.10-0-3 description: with introduces scope - that is captured by function expression -includes: [runTestCase.js] flags: [noStrict] ---*/ -function testcase() { var o = {prop: "12.10-0-3 before"}; var f; @@ -16,6 +14,5 @@ function testcase() { f = function () { return prop; } } o.prop = "12.10-0-3 after"; - return f()==="12.10-0-3 after" - } -runTestCase(testcase); + +assert.sameValue(f(), "12.10-0-3 after", 'f()'); diff --git a/test/language/statements/with/12.10-0-8.js b/test/language/statements/with/12.10-0-8.js index e3ed146049..e58d29a98f 100644 --- a/test/language/statements/with/12.10-0-8.js +++ b/test/language/statements/with/12.10-0-8.js @@ -4,17 +4,13 @@ /*--- es5id: 12.10-0-8 description: with introduces scope - var initializer sets like named property -includes: [runTestCase.js] flags: [noStrict] ---*/ -function testcase() { var o = {foo: 42}; with (o) { var foo = "set in with"; } - return o.foo === "set in with"; - } -runTestCase(testcase); +assert.sameValue(o.foo, "set in with", 'o.foo');