From 3de484fe8353448bf0496369f192cbd7a51cc4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Tue, 11 Aug 2015 17:42:41 +0200 Subject: Replace runTestCase with assert.throws [test/language/expressions] --- test/language/expressions/assignment/11.13.1-1-1.js | 14 +++----------- test/language/expressions/assignment/11.13.1-1-2.js | 14 +++----------- test/language/expressions/assignment/11.13.1-1-3.js | 14 +++----------- test/language/expressions/assignment/11.13.1-1-4.js | 14 +++----------- test/language/expressions/assignment/11.13.1-1-6-s.js | 12 ++---------- test/language/expressions/assignment/11.13.1-1-s.js | 13 +++---------- test/language/expressions/assignment/11.13.1-2-s.js | 13 +++---------- test/language/expressions/assignment/11.13.1-3-s.js | 12 ++---------- test/language/expressions/assignment/11.13.1-4-14-s.js | 13 +++---------- test/language/expressions/assignment/11.13.1-4-3-s.js | 16 ++++------------ test/language/expressions/assignment/11.13.1-4-30-s.js | 12 +++--------- test/language/expressions/assignment/11.13.1-4-6-s.js | 13 +++---------- test/language/expressions/assignment/8.14.4-8-b_2.js | 14 ++++---------- test/language/expressions/call/11.2.3-3_1.js | 11 +++-------- test/language/expressions/call/11.2.3-3_2.js | 11 +++-------- test/language/expressions/call/11.2.3-3_3.js | 11 +++-------- test/language/expressions/call/11.2.3-3_4.js | 13 +++++-------- test/language/expressions/call/11.2.3-3_5.js | 11 +++-------- test/language/expressions/call/11.2.3-3_6.js | 12 ++++-------- test/language/expressions/call/11.2.3-3_7.js | 12 ++++-------- test/language/expressions/call/11.2.3-3_8.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-1-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-10-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-11-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-2-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-23-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-24-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-25-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-26-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-27-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-28-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-29-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-3-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-30-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-31-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-32-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-33-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-34-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-35-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-36-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-37-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-38-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-39-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-4-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-40-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-41-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-42-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-43-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-44-s.js | 13 +++---------- .../expressions/compound-assignment/11.13.2-45-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-46-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-47-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-48-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-49-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-5-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-50-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-51-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-52-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-53-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-54-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-55-s.js | 12 ++---------- .../expressions/compound-assignment/11.13.2-6-1-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-10-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-11-s.js | 14 ++++---------- .../expressions/compound-assignment/11.13.2-6-2-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-3-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-4-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-5-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-6-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-7-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-8-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-9-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-6-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-7-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-8-s.js | 12 +++--------- .../expressions/compound-assignment/11.13.2-9-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-3-2.js | 14 ++------------ test/language/expressions/delete/11.4.1-3-a-1-s.js | 11 ++--------- test/language/expressions/delete/11.4.1-4-a-1-s.js | 13 +++---------- test/language/expressions/delete/11.4.1-4-a-2-s.js | 13 +++---------- test/language/expressions/delete/11.4.1-4.a-3-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-4.a-8-s.js | 15 +++------------ test/language/expressions/delete/11.4.1-4.a-9-s.js | 13 +++---------- test/language/expressions/delete/11.4.1-5-a-1-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-10-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-11-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-12-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-13-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-14-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-15-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-16-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-17-s.js | 13 +++---------- test/language/expressions/delete/11.4.1-5-a-18-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-19-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-2-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-20-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-21-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-22-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-23-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-24-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-25-s.js | 12 +++--------- test/language/expressions/delete/11.4.1-5-a-27-s.js | 11 ++--------- test/language/expressions/delete/11.4.1-5-a-3-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-4-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-5-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-6-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-7-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-8-s.js | 12 ++---------- test/language/expressions/delete/11.4.1-5-a-9-s.js | 12 ++---------- test/language/expressions/delete/11.4.4-4.a-3-s.js | 12 ++---------- test/language/expressions/object/11.1.5-1-s.js | 12 +++--------- test/language/expressions/object/11.1.5-2-s.js | 12 +++--------- test/language/expressions/object/11.1.5-3-s.js | 11 ++--------- test/language/expressions/object/11.1.5-4-s.js | 11 ++--------- test/language/expressions/object/11.1.5_6-2-1-s.js | 12 +++--------- test/language/expressions/object/11.1.5_6-2-2-s.js | 11 ++--------- test/language/expressions/object/11.1.5_7-2-1-s.js | 12 +++--------- test/language/expressions/object/11.1.5_7-2-2-s.js | 12 +++--------- .../expressions/postfix-decrement/11.3.2-2-2-s.js | 12 +++--------- .../expressions/postfix-increment/11.3.1-2-2-s.js | 12 +++--------- .../expressions/prefix-decrement/11.4.5-2-1-s.js | 12 +++--------- .../expressions/prefix-increment/11.4.4-2-1-s.js | 12 +++--------- 122 files changed, 336 insertions(+), 1172 deletions(-) (limited to 'test/language') diff --git a/test/language/expressions/assignment/11.13.1-1-1.js b/test/language/expressions/assignment/11.13.1-1-1.js index 4832a073c..5bc0891b1 100644 --- a/test/language/expressions/assignment/11.13.1-1-1.js +++ b/test/language/expressions/assignment/11.13.1-1-1.js @@ -7,17 +7,9 @@ es5id: 11.13.1-1-1 description: > simple assignment throws ReferenceError if LeftHandSide is not a reference (number) -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("42 = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-1-2.js b/test/language/expressions/assignment/11.13.1-1-2.js index 4ef12ab7d..8f42ba35b 100644 --- a/test/language/expressions/assignment/11.13.1-1-2.js +++ b/test/language/expressions/assignment/11.13.1-1-2.js @@ -7,17 +7,9 @@ es5id: 11.13.1-1-2 description: > simple assignment throws ReferenceError if LeftHandSide is not a reference (string) -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("'x' = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-1-3.js b/test/language/expressions/assignment/11.13.1-1-3.js index 1969b2a7f..196821e97 100644 --- a/test/language/expressions/assignment/11.13.1-1-3.js +++ b/test/language/expressions/assignment/11.13.1-1-3.js @@ -7,17 +7,9 @@ es5id: 11.13.1-1-3 description: > simple assignment throws ReferenceError if LeftHandSide is not a reference (boolean) -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("true = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-1-4.js b/test/language/expressions/assignment/11.13.1-1-4.js index 8b0dc8eb4..4a5cb1634 100644 --- a/test/language/expressions/assignment/11.13.1-1-4.js +++ b/test/language/expressions/assignment/11.13.1-1-4.js @@ -7,17 +7,9 @@ es5id: 11.13.1-1-4 description: > simple assignment throws ReferenceError if LeftHandSide is not a reference (null) -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("null = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-1-6-s.js b/test/language/expressions/assignment/11.13.1-1-6-s.js index 5a112ff1d..5da54baf4 100644 --- a/test/language/expressions/assignment/11.13.1-1-6-s.js +++ b/test/language/expressions/assignment/11.13.1-1-6-s.js @@ -7,17 +7,9 @@ es5id: 11.13.1-1-6-s description: > simple assignment throws ReferenceError if LeftHandSide is an unresolvable reference (base obj undefined) -includes: [runTestCase.js] ---*/ -function testcase() { - try { +assert.throws(ReferenceError, function() { __ES3_1_test_suite_test_11_13_1_unique_id_0__.x = 42; - return false; - } - catch (e) { - return (e instanceof ReferenceError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-1-s.js b/test/language/expressions/assignment/11.13.1-1-s.js index 9c8f508be..380814a00 100644 --- a/test/language/expressions/assignment/11.13.1-1-s.js +++ b/test/language/expressions/assignment/11.13.1-1-s.js @@ -8,10 +8,8 @@ description: > reference to a data property with the attribute value {[[Writable]]:false} under strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop = 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/assignment/11.13.1-2-s.js b/test/language/expressions/assignment/11.13.1-2-s.js index ee005def6..f0869cb85 100644 --- a/test/language/expressions/assignment/11.13.1-2-s.js +++ b/test/language/expressions/assignment/11.13.1-2-s.js @@ -8,10 +8,8 @@ description: > reference to an accessor property with the attribute value {[[Set]]:undefined} under strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop = 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/assignment/11.13.1-3-s.js b/test/language/expressions/assignment/11.13.1-3-s.js index 4f3e5e8a3..deee7fc8d 100644 --- a/test/language/expressions/assignment/11.13.1-3-s.js +++ b/test/language/expressions/assignment/11.13.1-3-s.js @@ -9,18 +9,10 @@ description: > [[Extensible]] internal property has the value false under strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len = 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-4-14-s.js b/test/language/expressions/assignment/11.13.1-4-14-s.js index 619395495..ee6899aaf 100644 --- a/test/language/expressions/assignment/11.13.1-4-14-s.js +++ b/test/language/expressions/assignment/11.13.1-4-14-s.js @@ -7,16 +7,9 @@ description: > simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Number.MAX_VALUE) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(TypeError, function() { Number.MAX_VALUE = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-4-3-s.js b/test/language/expressions/assignment/11.13.1-4-3-s.js index 22d88388b..20d175c7d 100644 --- a/test/language/expressions/assignment/11.13.1-4-3-s.js +++ b/test/language/expressions/assignment/11.13.1-4-3-s.js @@ -7,18 +7,10 @@ description: > simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.Infinity) flags: [onlyStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - try { + +assert.throws(TypeError, function() { fnGlobalObject().Infinity = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/11.13.1-4-30-s.js b/test/language/expressions/assignment/11.13.1-4-30-s.js index 242f96d10..70cdcd0af 100644 --- a/test/language/expressions/assignment/11.13.1-4-30-s.js +++ b/test/language/expressions/assignment/11.13.1-4-30-s.js @@ -8,16 +8,10 @@ description: > appears as the LeftHandSideExpression (PrimaryExpression) of simple assignment(=) under strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("(eval) = 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } -} -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/assignment/11.13.1-4-6-s.js b/test/language/expressions/assignment/11.13.1-4-6-s.js index bd35f51f4..7778e254d 100644 --- a/test/language/expressions/assignment/11.13.1-4-6-s.js +++ b/test/language/expressions/assignment/11.13.1-4-6-s.js @@ -7,16 +7,9 @@ description: > simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Function.length) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(TypeError, function() { Function.length = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/assignment/8.14.4-8-b_2.js b/test/language/expressions/assignment/8.14.4-8-b_2.js index 61c1f3f40..1223afeab 100644 --- a/test/language/expressions/assignment/8.14.4-8-b_2.js +++ b/test/language/expressions/assignment/8.14.4-8-b_2.js @@ -5,19 +5,13 @@ es5id: 8.14.4-8-b_2 description: Non-writable property on a prototype written to in strict mode. flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function foo() {}; Object.defineProperty(foo.prototype, "bar", {value: "unwritable"}); var o = new foo(); - try { - o.bar = "overridden"; - return false; - } catch(e) { - return (e instanceof TypeError) && (o.bar==="unwritable"); - } -} -runTestCase(testcase); +assert.throws(TypeError, function() { + o.bar = "overridden"; +}); +assert.sameValue(o.bar, "unwritable", 'o.bar'); diff --git a/test/language/expressions/call/11.2.3-3_1.js b/test/language/expressions/call/11.2.3-3_1.js index 4ae484842..e3299dc9e 100644 --- a/test/language/expressions/call/11.2.3-3_1.js +++ b/test/language/expressions/call/11.2.3-3_1.js @@ -6,19 +6,14 @@ es5id: 11.2.3-3_1 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (FunctionDeclaration) -includes: [runTestCase.js] ---*/ -function testcase() { var fooCalled = false; function foo(){ fooCalled = true; } var o = { }; - try { +assert.throws(TypeError, function() { o.bar( foo() ); $ERROR("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +}); +assert.sameValue(fooCalled, true, 'fooCalled'); diff --git a/test/language/expressions/call/11.2.3-3_2.js b/test/language/expressions/call/11.2.3-3_2.js index 0de02c677..d99eedfcb 100644 --- a/test/language/expressions/call/11.2.3-3_2.js +++ b/test/language/expressions/call/11.2.3-3_2.js @@ -6,19 +6,14 @@ es5id: 11.2.3-3_2 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (FunctionExpression) -includes: [runTestCase.js] ---*/ -function testcase() { var fooCalled = false; var foo = function (){ fooCalled = true; } var o = { }; - try { +assert.throws(TypeError, function() { o.bar( foo() ); $ERROR("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +}); +assert.sameValue(fooCalled, true, 'fooCalled'); diff --git a/test/language/expressions/call/11.2.3-3_3.js b/test/language/expressions/call/11.2.3-3_3.js index ef652bbd9..25d26bc70 100644 --- a/test/language/expressions/call/11.2.3-3_3.js +++ b/test/language/expressions/call/11.2.3-3_3.js @@ -6,19 +6,14 @@ es5id: 11.2.3-3_3 description: > Call arguments are not evaluated before the check is made to see if the object is actually callable (undefined member) -includes: [runTestCase.js] ---*/ -function testcase() { var fooCalled = false; function foo(){ fooCalled = true; } var o = { }; - try { +assert.throws(TypeError, function() { o.bar.gar( foo() ); $ERROR("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===false); - } -} -runTestCase(testcase); +}); +assert.sameValue(fooCalled, false, 'fooCalled'); diff --git a/test/language/expressions/call/11.2.3-3_4.js b/test/language/expressions/call/11.2.3-3_4.js index 99a7c543e..3a01ef550 100644 --- a/test/language/expressions/call/11.2.3-3_4.js +++ b/test/language/expressions/call/11.2.3-3_4.js @@ -6,21 +6,18 @@ es5id: 11.2.3-3_4 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (property) -includes: [runTestCase.js] ---*/ -function testcase() { var fooCalled = false; function foo(){ fooCalled = true; } var o = { }; Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, set: function(x) {this.barSetter = true; }}); - try { +assert.throws(TypeError, function() { o.bar( foo() ); $ERROR("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true) && (o.barGetter===true) && (o.barSetter===undefined); - } -} -runTestCase(testcase); +}); +assert.sameValue(fooCalled, true, 'fooCalled'); +assert.sameValue(o.barGetter, true, 'o.barGetter'); +assert.sameValue(o.barSetter, undefined, 'o.barSetter'); diff --git a/test/language/expressions/call/11.2.3-3_5.js b/test/language/expressions/call/11.2.3-3_5.js index f3e58fa1b..c8efb1a0b 100644 --- a/test/language/expressions/call/11.2.3-3_5.js +++ b/test/language/expressions/call/11.2.3-3_5.js @@ -6,19 +6,14 @@ es5id: 11.2.3-3_5 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (eval'ed) -includes: [runTestCase.js] ---*/ -function testcase() { var fooCalled = false; function foo(){ fooCalled = true; } var o = { }; - try { +assert.throws(TypeError, function() { eval("o.bar( foo() );"); $ERROR("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +}); +assert.sameValue(fooCalled, true, 'fooCalled'); diff --git a/test/language/expressions/call/11.2.3-3_6.js b/test/language/expressions/call/11.2.3-3_6.js index b302abac7..18b59596d 100644 --- a/test/language/expressions/call/11.2.3-3_6.js +++ b/test/language/expressions/call/11.2.3-3_6.js @@ -6,18 +6,14 @@ es5id: 11.2.3-3_6 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (getter called) -includes: [runTestCase.js] ---*/ -function testcase() { var o = { }; Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, set: function(x) {this.barSetter = true; }}); - try { +assert.throws(TypeError, function() { o.foo( o.bar ); $ERROR("o.foo does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); - } -} -runTestCase(testcase); +}); +assert.sameValue(o.barGetter, true, 'o.barGetter'); +assert.sameValue(o.barSetter, undefined, 'o.barSetter'); diff --git a/test/language/expressions/call/11.2.3-3_7.js b/test/language/expressions/call/11.2.3-3_7.js index 318413d92..b56ca7e6f 100644 --- a/test/language/expressions/call/11.2.3-3_7.js +++ b/test/language/expressions/call/11.2.3-3_7.js @@ -6,18 +6,14 @@ es5id: 11.2.3-3_7 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (getter called as indexed property) -includes: [runTestCase.js] ---*/ -function testcase() { var o = { }; Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, set: function(x) {this.barSetter = true; }}); - try { +assert.throws(TypeError, function() { o.foo( o["bar"] ); $ERROR("o.foo does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); - } -} -runTestCase(testcase); +}); +assert.sameValue(o.barGetter, true, 'o.barGetter'); +assert.sameValue(o.barSetter, undefined, 'o.barSetter'); diff --git a/test/language/expressions/call/11.2.3-3_8.js b/test/language/expressions/call/11.2.3-3_8.js index b0f4677b9..bc35ec06c 100644 --- a/test/language/expressions/call/11.2.3-3_8.js +++ b/test/language/expressions/call/11.2.3-3_8.js @@ -7,19 +7,12 @@ description: > Call arguments are evaluated before the check is made to see if the object is actually callable (global object) flags: [noStrict] -includes: - - runTestCase.js ---*/ -function testcase() { var fooCalled = false; function foo(){ fooCalled = true; } - - try { +assert.throws(TypeError, function() { this.bar( foo() ); $ERROR("this.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +}); +assert.sameValue(fooCalled, true, 'fooCalled'); diff --git a/test/language/expressions/compound-assignment/11.13.2-1-s.js b/test/language/expressions/compound-assignment/11.13.2-1-s.js index 159b17bfc..446461885 100644 --- a/test/language/expressions/compound-assignment/11.13.2-1-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-1-s.js @@ -6,15 +6,9 @@ es5id: 11.13.2-1-s description: > ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_1 *= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-10-s.js b/test/language/expressions/compound-assignment/11.13.2-10-s.js index b5726c941..1e652ce26 100644 --- a/test/language/expressions/compound-assignment/11.13.2-10-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-10-s.js @@ -6,15 +6,9 @@ es5id: 11.13.2-10-s description: > ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_10 ^= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-11-s.js b/test/language/expressions/compound-assignment/11.13.2-11-s.js index a55be9a4c..732862351 100644 --- a/test/language/expressions/compound-assignment/11.13.2-11-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-11-s.js @@ -6,15 +6,9 @@ es5id: 11.13.2-11-s description: > ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_11 |= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-2-s.js b/test/language/expressions/compound-assignment/11.13.2-2-s.js index 78ea77f01..1a66d33b1 100644 --- a/test/language/expressions/compound-assignment/11.13.2-2-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-2-s.js @@ -6,15 +6,9 @@ es5id: 11.13.2-2-s description: > Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_2 /= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-23-s.js b/test/language/expressions/compound-assignment/11.13.2-23-s.js index 739f62372..d209ecbf5 100644 --- a/test/language/expressions/compound-assignment/11.13.2-23-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-23-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(*=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop *= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-24-s.js b/test/language/expressions/compound-assignment/11.13.2-24-s.js index a4042bc4f..42bec67e9 100644 --- a/test/language/expressions/compound-assignment/11.13.2-24-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-24-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(/=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop /= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-25-s.js b/test/language/expressions/compound-assignment/11.13.2-25-s.js index 3a0955547..f3c4b11c3 100644 --- a/test/language/expressions/compound-assignment/11.13.2-25-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-25-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(%=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop %= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-26-s.js b/test/language/expressions/compound-assignment/11.13.2-26-s.js index 53fae8689..bdd0e68a3 100644 --- a/test/language/expressions/compound-assignment/11.13.2-26-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-26-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(+=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop += 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-27-s.js b/test/language/expressions/compound-assignment/11.13.2-27-s.js index d4d92cf0b..f87a5a2df 100644 --- a/test/language/expressions/compound-assignment/11.13.2-27-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-27-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(-=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop -= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-28-s.js b/test/language/expressions/compound-assignment/11.13.2-28-s.js index d65fcbefc..3bf144dae 100644 --- a/test/language/expressions/compound-assignment/11.13.2-28-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-28-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(<<=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop <<= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-29-s.js b/test/language/expressions/compound-assignment/11.13.2-29-s.js index 8974a1615..ed8091fcf 100644 --- a/test/language/expressions/compound-assignment/11.13.2-29-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-29-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(>>=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop >>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-3-s.js b/test/language/expressions/compound-assignment/11.13.2-3-s.js index 8eb11c9d0..93b23a3cc 100644 --- a/test/language/expressions/compound-assignment/11.13.2-3-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-3-s.js @@ -8,15 +8,9 @@ description: > LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to an unresolvable reference flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_3 %= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-30-s.js b/test/language/expressions/compound-assignment/11.13.2-30-s.js index ab927ad0d..26f120d3f 100644 --- a/test/language/expressions/compound-assignment/11.13.2-30-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-30-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(>>>=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop >>>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-31-s.js b/test/language/expressions/compound-assignment/11.13.2-31-s.js index 878ed63e3..0d6786620 100644 --- a/test/language/expressions/compound-assignment/11.13.2-31-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-31-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(&=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop &= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-32-s.js b/test/language/expressions/compound-assignment/11.13.2-32-s.js index 96f1ad9df..8182307d6 100644 --- a/test/language/expressions/compound-assignment/11.13.2-32-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-32-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(^=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop ^= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-33-s.js b/test/language/expressions/compound-assignment/11.13.2-33-s.js index f1aa5b365..c0883a6e5 100644 --- a/test/language/expressions/compound-assignment/11.13.2-33-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-33-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(|=) is a reference to a data property with the attribute value {[[Writable]]:false} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: 10, @@ -19,12 +17,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop |= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 10, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-34-s.js b/test/language/expressions/compound-assignment/11.13.2-34-s.js index 5ae15b667..b4becc6d0 100644 --- a/test/language/expressions/compound-assignment/11.13.2-34-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-34-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(*=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop *= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-35-s.js b/test/language/expressions/compound-assignment/11.13.2-35-s.js index 78aec217b..81829ff16 100644 --- a/test/language/expressions/compound-assignment/11.13.2-35-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-35-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(/=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop /= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-36-s.js b/test/language/expressions/compound-assignment/11.13.2-36-s.js index 3d771cff6..7eb331477 100644 --- a/test/language/expressions/compound-assignment/11.13.2-36-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-36-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(%=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop %= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-37-s.js b/test/language/expressions/compound-assignment/11.13.2-37-s.js index c21c84a7b..4d8aa3b8f 100644 --- a/test/language/expressions/compound-assignment/11.13.2-37-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-37-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(+=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop += 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-38-s.js b/test/language/expressions/compound-assignment/11.13.2-38-s.js index 6e637599a..9b39dca4f 100644 --- a/test/language/expressions/compound-assignment/11.13.2-38-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-38-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(-=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop -= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-39-s.js b/test/language/expressions/compound-assignment/11.13.2-39-s.js index 3b78d131e..ebd44377c 100644 --- a/test/language/expressions/compound-assignment/11.13.2-39-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-39-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(<<=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop <<= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-4-s.js b/test/language/expressions/compound-assignment/11.13.2-4-s.js index 3370fe187..aeecd46c7 100644 --- a/test/language/expressions/compound-assignment/11.13.2-4-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-4-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_4 += 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-40-s.js b/test/language/expressions/compound-assignment/11.13.2-40-s.js index ac6cd92e6..28f57bd4c 100644 --- a/test/language/expressions/compound-assignment/11.13.2-40-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-40-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop >>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-41-s.js b/test/language/expressions/compound-assignment/11.13.2-41-s.js index 707032af8..d5d567d97 100644 --- a/test/language/expressions/compound-assignment/11.13.2-41-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-41-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(>>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop >>>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-42-s.js b/test/language/expressions/compound-assignment/11.13.2-42-s.js index 5d81a5130..860fefca8 100644 --- a/test/language/expressions/compound-assignment/11.13.2-42-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-42-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(&=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop &= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-43-s.js b/test/language/expressions/compound-assignment/11.13.2-43-s.js index b3c1e38b3..b25ca2ba1 100644 --- a/test/language/expressions/compound-assignment/11.13.2-43-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-43-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(^=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop ^= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-44-s.js b/test/language/expressions/compound-assignment/11.13.2-44-s.js index 75808f9ac..948905987 100644 --- a/test/language/expressions/compound-assignment/11.13.2-44-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-44-s.js @@ -8,10 +8,8 @@ description: > Compound Assignment operator(|=) is a reference of to an accessor property with the attribute value {[[Set]]:undefined} flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -21,12 +19,7 @@ function testcase() { enumerable: true, configurable: true }); - - try { +assert.throws(TypeError, function() { obj.prop |= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, 11, 'obj.prop'); diff --git a/test/language/expressions/compound-assignment/11.13.2-45-s.js b/test/language/expressions/compound-assignment/11.13.2-45-s.js index b912bfd9d..93cfaa249 100644 --- a/test/language/expressions/compound-assignment/11.13.2-45-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-45-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len *= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-46-s.js b/test/language/expressions/compound-assignment/11.13.2-46-s.js index 81af78fd7..26bc4c6e7 100644 --- a/test/language/expressions/compound-assignment/11.13.2-46-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-46-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len /= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-47-s.js b/test/language/expressions/compound-assignment/11.13.2-47-s.js index bd195e5eb..75805899f 100644 --- a/test/language/expressions/compound-assignment/11.13.2-47-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-47-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len %= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-48-s.js b/test/language/expressions/compound-assignment/11.13.2-48-s.js index a6f09bfe9..920b643cc 100644 --- a/test/language/expressions/compound-assignment/11.13.2-48-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-48-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len += 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-49-s.js b/test/language/expressions/compound-assignment/11.13.2-49-s.js index fc5dff939..48f3aedbf 100644 --- a/test/language/expressions/compound-assignment/11.13.2-49-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-49-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len -= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-5-s.js b/test/language/expressions/compound-assignment/11.13.2-5-s.js index 6c9bc27a6..16654674a 100644 --- a/test/language/expressions/compound-assignment/11.13.2-5-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-5-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_5 -= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-50-s.js b/test/language/expressions/compound-assignment/11.13.2-50-s.js index bca80fc10..2e46189b6 100644 --- a/test/language/expressions/compound-assignment/11.13.2-50-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-50-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len <<= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-51-s.js b/test/language/expressions/compound-assignment/11.13.2-51-s.js index 1700bb52d..53d27cb23 100644 --- a/test/language/expressions/compound-assignment/11.13.2-51-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-51-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len >>= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-52-s.js b/test/language/expressions/compound-assignment/11.13.2-52-s.js index 903fe627c..e0f5b604e 100644 --- a/test/language/expressions/compound-assignment/11.13.2-52-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-52-s.js @@ -9,18 +9,10 @@ description: > non-existent property of an object whose [[Extensible]] internal property if false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len >>>= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-53-s.js b/test/language/expressions/compound-assignment/11.13.2-53-s.js index e806f5c7f..335a8ba0a 100644 --- a/test/language/expressions/compound-assignment/11.13.2-53-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-53-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len &= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-54-s.js b/test/language/expressions/compound-assignment/11.13.2-54-s.js index 3ea74293a..f0c9a4930 100644 --- a/test/language/expressions/compound-assignment/11.13.2-54-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-54-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len ^= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-55-s.js b/test/language/expressions/compound-assignment/11.13.2-55-s.js index 572557313..9a56c0a23 100644 --- a/test/language/expressions/compound-assignment/11.13.2-55-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-55-s.js @@ -9,18 +9,10 @@ description: > property of an object whose [[Extensible]] internal property is false flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.preventExtensions(obj); - - try { +assert.throws(TypeError, function() { obj.len |= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-1-s.js b/test/language/expressions/compound-assignment/11.13.2-6-1-s.js index cc66c4642..2e8f1b9c8 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-1-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-1-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(*=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval *= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-10-s.js b/test/language/expressions/compound-assignment/11.13.2-6-10-s.js index e126407e2..aa3ff2c02 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-10-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-10-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(^=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval ^= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-11-s.js b/test/language/expressions/compound-assignment/11.13.2-6-11-s.js index ea5caeca8..a6bd1295a 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-11-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-11-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(|=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { - eval("eval |= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +assert.throws(SyntaxError, function() { + eval("eval |= 20;"); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-2-s.js b/test/language/expressions/compound-assignment/11.13.2-6-2-s.js index 3be6d709f..e2e549c3d 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-2-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-2-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(/=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval /= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-3-s.js b/test/language/expressions/compound-assignment/11.13.2-6-3-s.js index 0612d5364..6e79a2089 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-3-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-3-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(%=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval %= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-4-s.js b/test/language/expressions/compound-assignment/11.13.2-6-4-s.js index eab0d354c..fbff6abb7 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-4-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-4-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(+=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval += 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-5-s.js b/test/language/expressions/compound-assignment/11.13.2-6-5-s.js index 93389778e..a01ada363 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-5-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-5-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(-=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval -= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-6-s.js b/test/language/expressions/compound-assignment/11.13.2-6-6-s.js index b57fed010..c4c7360c8 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-6-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-6-s.js @@ -8,16 +8,10 @@ description: > as the LeftHandSideExpression of a Compound Assignment operator(<<=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval <<= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-7-s.js b/test/language/expressions/compound-assignment/11.13.2-6-7-s.js index 1599e4f89..8778fbdf1 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-7-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-7-s.js @@ -8,16 +8,10 @@ description: > as the LeftHandSideExpression of a Compound Assignment operator(>>=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval >>= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-8-s.js b/test/language/expressions/compound-assignment/11.13.2-6-8-s.js index 66519aa72..f67a3b7ff 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-8-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-8-s.js @@ -8,16 +8,10 @@ description: > as the LeftHandSideExpression of a Compound Assignment operator(>>>=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval >>>= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-9-s.js b/test/language/expressions/compound-assignment/11.13.2-6-9-s.js index 098cca586..4db6cba4a 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-9-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-9-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(&=) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval &= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/compound-assignment/11.13.2-6-s.js b/test/language/expressions/compound-assignment/11.13.2-6-s.js index 563676a9a..14084ba7e 100644 --- a/test/language/expressions/compound-assignment/11.13.2-6-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-6-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_6 <<= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-7-s.js b/test/language/expressions/compound-assignment/11.13.2-7-s.js index f6a6fa948..ae8d2b192 100644 --- a/test/language/expressions/compound-assignment/11.13.2-7-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-7-s.js @@ -8,15 +8,9 @@ description: > LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to an unresolvable reference flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_7 >>= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-8-s.js b/test/language/expressions/compound-assignment/11.13.2-8-s.js index d37ef25a6..ecd1cd832 100644 --- a/test/language/expressions/compound-assignment/11.13.2-8-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-8-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_8 >>>= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/compound-assignment/11.13.2-9-s.js b/test/language/expressions/compound-assignment/11.13.2-9-s.js index b58701da8..50836f4f6 100644 --- a/test/language/expressions/compound-assignment/11.13.2-9-s.js +++ b/test/language/expressions/compound-assignment/11.13.2-9-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to an unresolvable reference -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(ReferenceError, function() { eval("_11_13_2_9 &= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-3-2.js b/test/language/expressions/delete/11.4.1-3-2.js index df1c3f612..608468319 100644 --- a/test/language/expressions/delete/11.4.1-3-2.js +++ b/test/language/expressions/delete/11.4.1-3-2.js @@ -6,19 +6,9 @@ es5id: 11.4.1-3-2 description: > delete operator throws ReferenceError when deleting an explicitly qualified yet unresolvable reference (base obj undefined) -includes: [runTestCase.js] ---*/ -function testcase() { // just cooking up a long/veryLikely unique name - try - { +assert.throws(ReferenceError, function() { var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_2__.x; - } - catch(e) - { - if (e instanceof ReferenceError) - return true; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-3-a-1-s.js b/test/language/expressions/delete/11.4.1-3-a-1-s.js index fd3db626c..cb66ac032 100644 --- a/test/language/expressions/delete/11.4.1-3-a-1-s.js +++ b/test/language/expressions/delete/11.4.1-3-a-1-s.js @@ -7,16 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting an un-resolvable reference flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { +assert.throws(SyntaxError, function() { eval("delete obj"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-4-a-1-s.js b/test/language/expressions/delete/11.4.1-4-a-1-s.js index cd5b561e9..73544a0fd 100644 --- a/test/language/expressions/delete/11.4.1-4-a-1-s.js +++ b/test/language/expressions/delete/11.4.1-4-a-1-s.js @@ -7,21 +7,14 @@ description: > Strict Mode - TypeError is thrown when deleting non-configurable data property flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: "abc", configurable: false }); - - try { +assert.throws(TypeError, function() { delete obj.prop; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === "abc"; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, "abc", 'obj.prop'); diff --git a/test/language/expressions/delete/11.4.1-4-a-2-s.js b/test/language/expressions/delete/11.4.1-4-a-2-s.js index b61a6c0e6..431d61f1c 100644 --- a/test/language/expressions/delete/11.4.1-4-a-2-s.js +++ b/test/language/expressions/delete/11.4.1-4-a-2-s.js @@ -7,10 +7,8 @@ description: > Strict Mode - TypeError is thrown when deleting non-configurable accessor property flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { get: function () { @@ -18,12 +16,7 @@ function testcase() { }, configurable: false }); - - try { +assert.throws(TypeError, function() { delete obj.prop; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === "abc"; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, "abc", 'obj.prop'); diff --git a/test/language/expressions/delete/11.4.1-4.a-3-s.js b/test/language/expressions/delete/11.4.1-4.a-3-s.js index 501f3162e..1ea95a6b7 100644 --- a/test/language/expressions/delete/11.4.1-4.a-3-s.js +++ b/test/language/expressions/delete/11.4.1-4.a-3-s.js @@ -10,21 +10,13 @@ description: > delete operator throws TypeError when deleting a non-configurable data property in strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; var desc = { value : 1 }; // all other attributes default to false Object.defineProperty(o, "foo", desc); // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false. - try { +assert.throws(TypeError, function() { delete o.foo; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-4.a-8-s.js b/test/language/expressions/delete/11.4.1-4.a-8-s.js index 69bb9fa51..a0dd257ef 100644 --- a/test/language/expressions/delete/11.4.1-4.a-8-s.js +++ b/test/language/expressions/delete/11.4.1-4.a-8-s.js @@ -10,19 +10,10 @@ description: > delete operator throws TypeError when deleting a non-configurable data property in strict mode flags: [onlyStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { // NaN (15.1.1.1) has [[Configurable]] set to false. - try { +assert.throws(TypeError, function() { delete fnGlobalObject().NaN; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-4.a-9-s.js b/test/language/expressions/delete/11.4.1-4.a-9-s.js index 197d0769e..f4cefb2ca 100644 --- a/test/language/expressions/delete/11.4.1-4.a-9-s.js +++ b/test/language/expressions/delete/11.4.1-4.a-9-s.js @@ -10,16 +10,9 @@ description: > delete operator throws TypeError when deleting a non-configurable data property (Math.LN2) in strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(TypeError, function() { delete Math.LN2; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-1-s.js b/test/language/expressions/delete/11.4.1-5-a-1-s.js index b7200bc3e..86575dd32 100644 --- a/test/language/expressions/delete/11.4.1-5-a-1-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-1-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive value type (number) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var _11_4_1_5 = 5; - - try { +assert.throws(SyntaxError, function() { eval("delete _11_4_1_5;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-10-s.js b/test/language/expressions/delete/11.4.1-5-a-10-s.js index 5b23498a9..a48304837 100644 --- a/test/language/expressions/delete/11.4.1-5-a-10-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-10-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Array flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var arrObj = [1,2,3]; - - try { +assert.throws(SyntaxError, function() { eval("delete arrObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-11-s.js b/test/language/expressions/delete/11.4.1-5-a-11-s.js index 57f22f6c9..49c29c283 100644 --- a/test/language/expressions/delete/11.4.1-5-a-11-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-11-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type String flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var strObj = new String("abc"); - - try { +assert.throws(SyntaxError, function() { eval("delete strObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-12-s.js b/test/language/expressions/delete/11.4.1-5-a-12-s.js index e29240876..1b6c4d62b 100644 --- a/test/language/expressions/delete/11.4.1-5-a-12-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-12-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Boolean flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var boolObj = new Boolean(false); - - try { +assert.throws(SyntaxError, function() { eval("delete boolObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-13-s.js b/test/language/expressions/delete/11.4.1-5-a-13-s.js index aeb96027b..7fd026838 100644 --- a/test/language/expressions/delete/11.4.1-5-a-13-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-13-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Number flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var numObj = new Number(0); - - try { +assert.throws(SyntaxError, function() { eval("delete numObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-14-s.js b/test/language/expressions/delete/11.4.1-5-a-14-s.js index c39db53a4..f9f20d490 100644 --- a/test/language/expressions/delete/11.4.1-5-a-14-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-14-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Date flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var dateObj = new Date(); - - try { +assert.throws(SyntaxError, function() { eval("delete dateObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-15-s.js b/test/language/expressions/delete/11.4.1-5-a-15-s.js index f3f54e138..38e873065 100644 --- a/test/language/expressions/delete/11.4.1-5-a-15-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-15-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type RegExp flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var regObj = new RegExp(); - - try { +assert.throws(SyntaxError, function() { eval("delete regObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-16-s.js b/test/language/expressions/delete/11.4.1-5-a-16-s.js index 876760d2a..cf730de50 100644 --- a/test/language/expressions/delete/11.4.1-5-a-16-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-16-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Error flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var errObj = new Error(); - - try { +assert.throws(SyntaxError, function() { eval("delete errObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-17-s.js b/test/language/expressions/delete/11.4.1-5-a-17-s.js index 502b09219..55ebf2e48 100644 --- a/test/language/expressions/delete/11.4.1-5-a-17-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-17-s.js @@ -7,16 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Arguments flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { - eval("var argObj = (function (a, b) { delete arguments; }(1, 2));"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +assert.throws(SyntaxError, function() { + eval("var argObj = (function (a, b) { delete arguments; }(1, 2));"); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-18-s.js b/test/language/expressions/delete/11.4.1-5-a-18-s.js index c370de06f..eb1af56e1 100644 --- a/test/language/expressions/delete/11.4.1-5-a-18-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-18-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (Object) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete Object;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-19-s.js b/test/language/expressions/delete/11.4.1-5-a-19-s.js index f960f9032..442e22f0b 100644 --- a/test/language/expressions/delete/11.4.1-5-a-19-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-19-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (Function) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete Function;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-2-s.js b/test/language/expressions/delete/11.4.1-5-a-2-s.js index 1d39f9a2d..b9afc1edf 100644 --- a/test/language/expressions/delete/11.4.1-5-a-2-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-2-s.js @@ -7,19 +7,11 @@ description: > Strict Mode - SyntaxError is thrown when deleting a function parameter flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function funObj(x) { eval("delete x;"); } - - try { +assert.throws(SyntaxError, function() { funObj(1); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-20-s.js b/test/language/expressions/delete/11.4.1-5-a-20-s.js index 2f66bd7ed..456c4b3f0 100644 --- a/test/language/expressions/delete/11.4.1-5-a-20-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-20-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (Array) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete Array;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-21-s.js b/test/language/expressions/delete/11.4.1-5-a-21-s.js index 43d29cb98..1bf9bd3ce 100644 --- a/test/language/expressions/delete/11.4.1-5-a-21-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-21-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (String) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete String;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-22-s.js b/test/language/expressions/delete/11.4.1-5-a-22-s.js index acab4ea75..1e02b15aa 100644 --- a/test/language/expressions/delete/11.4.1-5-a-22-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-22-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (Boolean) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete Boolean;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-23-s.js b/test/language/expressions/delete/11.4.1-5-a-23-s.js index 1eb2eb08d..e383430d8 100644 --- a/test/language/expressions/delete/11.4.1-5-a-23-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-23-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (Number) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete Number;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-24-s.js b/test/language/expressions/delete/11.4.1-5-a-24-s.js index e3782a273..ef63b0579 100644 --- a/test/language/expressions/delete/11.4.1-5-a-24-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-24-s.js @@ -5,15 +5,9 @@ es5id: 11.4.1-5-a-24-s description: Strict Mode - SyntaxError is thrown when deleting a built-in (Date) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete Date;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-25-s.js b/test/language/expressions/delete/11.4.1-5-a-25-s.js index dcbf2ccb4..8484c985a 100644 --- a/test/language/expressions/delete/11.4.1-5-a-25-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-25-s.js @@ -7,15 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a built-in (RegExp) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("delete RegExp;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-27-s.js b/test/language/expressions/delete/11.4.1-5-a-27-s.js index 04e2a9e76..b2bd62588 100644 --- a/test/language/expressions/delete/11.4.1-5-a-27-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-27-s.js @@ -7,18 +7,11 @@ description: > Strict Mode - TypeError is thrown after deleting a property, calling preventExtensions, and attempting to reassign the property flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var a = {x:0, get y() { return 0;}}; delete a.x; Object.preventExtensions(a); - try { +assert.throws(TypeError, function() { a.x = 1; - return false; - } catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-3-s.js b/test/language/expressions/delete/11.4.1-5-a-3-s.js index 7780f4ddc..224dd524e 100644 --- a/test/language/expressions/delete/11.4.1-5-a-3-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-3-s.js @@ -5,17 +5,9 @@ es5id: 11.4.1-5-a-3-s description: Strict Mode - SyntaxError is thrown when deleting a function name flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function funObj () { } - - try { +assert.throws(SyntaxError, function() { eval("delete funObj"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-4-s.js b/test/language/expressions/delete/11.4.1-5-a-4-s.js index 51714eba8..93138ea90 100644 --- a/test/language/expressions/delete/11.4.1-5-a-4-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-4-s.js @@ -7,19 +7,11 @@ description: > Strict Mode - SyntaxError is thrown when deleting a function parameter flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function funObj(x, y, z) { eval("delete y;"); } - - try { +assert.throws(SyntaxError, function() { funObj(1); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-5-s.js b/test/language/expressions/delete/11.4.1-5-a-5-s.js index 88020733c..b6b12cc04 100644 --- a/test/language/expressions/delete/11.4.1-5-a-5-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-5-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive type (boolean) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var _11_4_1_5 = true; - - try { +assert.throws(SyntaxError, function() { eval("delete _11_4_1_5;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-6-s.js b/test/language/expressions/delete/11.4.1-5-a-6-s.js index 4a4cd5ee0..1d30df158 100644 --- a/test/language/expressions/delete/11.4.1-5-a-6-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-6-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive type (string) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var _11_4_1_5 = "abc"; - - try { +assert.throws(SyntaxError, function() { eval("delete _11_4_1_5;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-7-s.js b/test/language/expressions/delete/11.4.1-5-a-7-s.js index a9dd1f76f..b29661e7e 100644 --- a/test/language/expressions/delete/11.4.1-5-a-7-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-7-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type Object flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = new Object(); - - try { +assert.throws(SyntaxError, function() { eval("delete obj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-8-s.js b/test/language/expressions/delete/11.4.1-5-a-8-s.js index ee7fabd4c..721bae15f 100644 --- a/test/language/expressions/delete/11.4.1-5-a-8-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-8-s.js @@ -5,17 +5,9 @@ es5id: 11.4.1-5-a-8-s description: Strict Mode - SyntaxError is thrown when deleting a function object flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var funObj = function () { }; - - try { +assert.throws(SyntaxError, function() { eval("delete funObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.1-5-a-9-s.js b/test/language/expressions/delete/11.4.1-5-a-9-s.js index 4f5110271..0a5cf3622 100644 --- a/test/language/expressions/delete/11.4.1-5-a-9-s.js +++ b/test/language/expressions/delete/11.4.1-5-a-9-s.js @@ -7,17 +7,9 @@ description: > Strict Mode - SyntaxError is thrown when deleting a variable of type function (declaration) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function funObj () { }; - - try { +assert.throws(SyntaxError, function() { eval("delete funObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/delete/11.4.4-4.a-3-s.js b/test/language/expressions/delete/11.4.4-4.a-3-s.js index 8f9455fc5..72c7a0ad7 100644 --- a/test/language/expressions/delete/11.4.4-4.a-3-s.js +++ b/test/language/expressions/delete/11.4.4-4.a-3-s.js @@ -10,21 +10,13 @@ description: > delete operator throws TypeError when deleting a non-configurable data property in strict mode flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var o = {}; var desc = { value : 1 }; // all other attributes default to false Object.defineProperty(o, "foo", desc); // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false. - try { +assert.throws(TypeError, function() { delete o.foo; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5-1-s.js b/test/language/expressions/object/11.1.5-1-s.js index 865f4d7df..abc491dcb 100644 --- a/test/language/expressions/object/11.1.5-1-s.js +++ b/test/language/expressions/object/11.1.5-1-s.js @@ -8,15 +8,9 @@ description: > Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("var obj = {set _11_1_5_1_fun(eval) {}};"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5-2-s.js b/test/language/expressions/object/11.1.5-2-s.js index 604191572..7a4c054df 100644 --- a/test/language/expressions/object/11.1.5-2-s.js +++ b/test/language/expressions/object/11.1.5-2-s.js @@ -8,15 +8,9 @@ description: > Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("var obj = {set _11_1_5_2_fun(arguments) {} };"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5-3-s.js b/test/language/expressions/object/11.1.5-3-s.js index 7817fcea2..831a80194 100644 --- a/test/language/expressions/object/11.1.5-3-s.js +++ b/test/language/expressions/object/11.1.5-3-s.js @@ -8,16 +8,9 @@ description: > Identifier in a PropertySetParameterList of a PropertyAssignment if its FunctionBody is strict code flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { +assert.throws(SyntaxError, function() { eval("var obj = {set _11_1_5_3_fun(eval) { \"use strict\"; }};"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5-4-s.js b/test/language/expressions/object/11.1.5-4-s.js index 422416f0c..dc1613906 100644 --- a/test/language/expressions/object/11.1.5-4-s.js +++ b/test/language/expressions/object/11.1.5-4-s.js @@ -8,16 +8,9 @@ description: > the Identifier in a PropertySetParameterList of a PropertyAssignment if its FunctionBody is strict code flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { +assert.throws(SyntaxError, function() { eval("var obj = {set _11_1_5_4_fun(arguments) {\"use strict\";}};"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5_6-2-1-s.js b/test/language/expressions/object/11.1.5_6-2-1-s.js index 589a2075e..65035c0ea 100644 --- a/test/language/expressions/object/11.1.5_6-2-1-s.js +++ b/test/language/expressions/object/11.1.5_6-2-1-s.js @@ -7,11 +7,10 @@ description: > Strict Mode - SyntaxError is thrown when an assignment to a reserved word or a future reserved word is contained in strict code flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("var obj = {\ get _11_1_5_6_2_1() {\ public = 42;\ @@ -20,9 +19,4 @@ function testcase() { };"); var _11_1_5_6_2_1 = obj._11_1_5_6_2_1; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5_6-2-2-s.js b/test/language/expressions/object/11.1.5_6-2-2-s.js index d52470741..9ae348ff5 100644 --- a/test/language/expressions/object/11.1.5_6-2-2-s.js +++ b/test/language/expressions/object/11.1.5_6-2-2-s.js @@ -8,12 +8,10 @@ description: > reserved word or a future reserved word is made inside a strict mode FunctionBody of a PropertyAssignment flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { +assert.throws(SyntaxError, function() { eval("var obj = {\ get _11_1_5_6_2_2() {\ \"use strict\";\ @@ -22,9 +20,4 @@ function testcase() { }\ };\ var _11_1_5_6_2_2 = obj._11_1_5_6_2_2;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5_7-2-1-s.js b/test/language/expressions/object/11.1.5_7-2-1-s.js index e0361fc5d..f71697741 100644 --- a/test/language/expressions/object/11.1.5_7-2-1-s.js +++ b/test/language/expressions/object/11.1.5_7-2-1-s.js @@ -7,11 +7,10 @@ description: > Strict Mode - SyntaxError is thrown when an assignment to a reserved word is contained in strict code flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("var data = \"data\";\ var obj = {\ set _11_1_5_7_2_1(value) {\ @@ -20,9 +19,4 @@ function testcase() { }\ };\ obj._11_1_5_7_2_1 = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/object/11.1.5_7-2-2-s.js b/test/language/expressions/object/11.1.5_7-2-2-s.js index 84b0ac3a1..08cfe79df 100644 --- a/test/language/expressions/object/11.1.5_7-2-2-s.js +++ b/test/language/expressions/object/11.1.5_7-2-2-s.js @@ -8,11 +8,10 @@ description: > reserved word is made in a strict FunctionBody of a PropertyAssignment flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { + +assert.throws(SyntaxError, function() { eval("var data = \"data\";\ var obj = {\ set _11_1_5_7_2_2(value) {\ @@ -21,9 +20,4 @@ function testcase() { }\ };\ obj._11_1_5_7_2_2 = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/expressions/postfix-decrement/11.3.2-2-2-s.js b/test/language/expressions/postfix-decrement/11.3.2-2-2-s.js index 0fc15b17a..526318e0e 100644 --- a/test/language/expressions/postfix-decrement/11.3.2-2-2-s.js +++ b/test/language/expressions/postfix-decrement/11.3.2-2-2-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier 'eval' appear as a PostfixExpression(eval--) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval--;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/postfix-increment/11.3.1-2-2-s.js b/test/language/expressions/postfix-increment/11.3.1-2-2-s.js index 56aaa3d1a..54e117f98 100644 --- a/test/language/expressions/postfix-increment/11.3.1-2-2-s.js +++ b/test/language/expressions/postfix-increment/11.3.1-2-2-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - SyntaxError is thrown if the identifier 'eval' appear as a PostfixExpression(eval++) flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("eval++;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/prefix-decrement/11.4.5-2-1-s.js b/test/language/expressions/prefix-decrement/11.4.5-2-1-s.js index fbbf88299..5c1058187 100644 --- a/test/language/expressions/prefix-decrement/11.4.5-2-1-s.js +++ b/test/language/expressions/prefix-decrement/11.4.5-2-1-s.js @@ -5,16 +5,10 @@ es5id: 11.4.5-2-1-s description: Strict Mode - SyntaxError is thrown for --eval flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("--eval;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); diff --git a/test/language/expressions/prefix-increment/11.4.4-2-1-s.js b/test/language/expressions/prefix-increment/11.4.4-2-1-s.js index 9ff404bdc..35f72e827 100644 --- a/test/language/expressions/prefix-increment/11.4.4-2-1-s.js +++ b/test/language/expressions/prefix-increment/11.4.4-2-1-s.js @@ -5,16 +5,10 @@ es5id: 11.4.4-2-1-s description: Strict Mode - SyntaxError is thrown for ++eval flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var blah = eval; - try { +assert.throws(SyntaxError, function() { eval("++eval;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +}); +assert.sameValue(blah, eval, 'blah'); -- cgit v1.2.1