diff --git a/test/language/directive-prologue/10.1.1-1-s.js b/test/language/directive-prologue/10.1.1-1-s.js index fe2fa106f4..cd5d28a261 100644 --- a/test/language/directive-prologue/10.1.1-1-s.js +++ b/test/language/directive-prologue/10.1.1-1-s.js @@ -7,12 +7,12 @@ description: > Strict Mode - Use Strict Directive Prologue is 'use strict'; which contains two space between 'use' and 'strict' flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "use strict"; var public = 1; - return public === 1; + + assert.sameValue(public, 1); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-10-s.js b/test/language/directive-prologue/10.1.1-10-s.js index 46ffddb30e..cf724969af 100644 --- a/test/language/directive-prologue/10.1.1-10-s.js +++ b/test/language/directive-prologue/10.1.1-10-s.js @@ -7,12 +7,12 @@ description: > Strict Mode - Use Strict Directive Prologue is ''USE STRICT';' in which all characters are uppercase flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "USE STRICT"; var public = 1; - return public === 1; + + assert.sameValue(public, 1); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-11-s.js b/test/language/directive-prologue/10.1.1-11-s.js index 3efc01b213..edc43e312d 100644 --- a/test/language/directive-prologue/10.1.1-11-s.js +++ b/test/language/directive-prologue/10.1.1-11-s.js @@ -7,17 +7,16 @@ description: > Strict Mode - Eval code is strict code with a Use Strict Directive at the beginning of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +var err = null; + try { eval("'use strict'; var public = 1; var anotherVariableNotReserveWord = 2;"); - - return false; } catch (e) { - return e instanceof SyntaxError && typeof public === "undefined" && - typeof anotherVariableNotReserveWord === "undefined"; + err = e; } - } -runTestCase(testcase); + +assert(err instanceof SyntaxError, 'err instanceof SyntaxError'); +assert.sameValue(typeof public, "undefined", 'typeof public'); +assert.sameValue(typeof anotherVariableNotReserveWord, "undefined", 'typeof anotherVariableNotReserveWord'); diff --git a/test/language/directive-prologue/10.1.1-12-s.js b/test/language/directive-prologue/10.1.1-12-s.js index 2915de0fda..7cc4eb0cb6 100644 --- a/test/language/directive-prologue/10.1.1-12-s.js +++ b/test/language/directive-prologue/10.1.1-12-s.js @@ -7,11 +7,9 @@ description: > Strict Mode - Eval code is strict eval code with a Use Strict Directive in the middle of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { eval("var public = 1; 'use strict'; var anotherVariableNotReserveWord = 2;"); - return public === 1 && anotherVariableNotReserveWord === 2; - } -runTestCase(testcase); + +assert.sameValue(public, 1, 'public'); +assert.sameValue(anotherVariableNotReserveWord, 2, 'anotherVariableNotReserveWord'); diff --git a/test/language/directive-prologue/10.1.1-13-s.js b/test/language/directive-prologue/10.1.1-13-s.js index 99284e2644..72d739190a 100644 --- a/test/language/directive-prologue/10.1.1-13-s.js +++ b/test/language/directive-prologue/10.1.1-13-s.js @@ -7,11 +7,9 @@ description: > Strict Mode - Eval code is strict eval code with a Use Strict Directive at the end of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { eval("var public = 1; var anotherVariableNotReserveWord = 2; 'use strict';"); - return public === 1 && anotherVariableNotReserveWord === 2; - } -runTestCase(testcase); + +assert.sameValue(public, 1, 'public'); +assert.sameValue(anotherVariableNotReserveWord, 2, 'anotherVariableNotReserveWord'); diff --git a/test/language/directive-prologue/10.1.1-14-s.js b/test/language/directive-prologue/10.1.1-14-s.js index 33feedbf47..77f4c4c76d 100644 --- a/test/language/directive-prologue/10.1.1-14-s.js +++ b/test/language/directive-prologue/10.1.1-14-s.js @@ -7,16 +7,10 @@ description: > Strict Mode - The call to eval function is contained in a Strict Mode block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +assert.throws(SyntaxError, function() { 'use strict'; - try { + eval("var public = 1;"); - return false; - } catch (e) { - return true; - } - } -runTestCase(testcase); +}); diff --git a/test/language/directive-prologue/10.1.1-15-s.js b/test/language/directive-prologue/10.1.1-15-s.js index b316f4739f..00a10fab71 100644 --- a/test/language/directive-prologue/10.1.1-15-s.js +++ b/test/language/directive-prologue/10.1.1-15-s.js @@ -8,20 +8,16 @@ description: > is strict function code if FunctionDeclaration is contained in use strict flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "use strict"; function fun() { - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } + eval("var public = 1;"); } - return fun(); + assert.throws(SyntaxError, function() { + fun(); + }); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-16-s.js b/test/language/directive-prologue/10.1.1-16-s.js index db6f470cae..a55007a16a 100644 --- a/test/language/directive-prologue/10.1.1-16-s.js +++ b/test/language/directive-prologue/10.1.1-16-s.js @@ -8,18 +8,13 @@ description: > is strict function code if FunctionExpression is contained in use strict flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "use strict"; - return function () { - try { + + assert.throws(SyntaxError, function() { eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } (); + }); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-17-s.js b/test/language/directive-prologue/10.1.1-17-s.js index c7be757a3b..f3a448869b 100644 --- a/test/language/directive-prologue/10.1.1-17-s.js +++ b/test/language/directive-prologue/10.1.1-17-s.js @@ -8,12 +8,10 @@ description: > PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(getter) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +assert.throws(SyntaxError, function() { "use strict"; - try { var obj = {}; Object.defineProperty(obj, "accProperty", { get: function () { @@ -23,9 +21,4 @@ function testcase() { }); var temp = obj.accProperty === 11; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/directive-prologue/10.1.1-18-s.js b/test/language/directive-prologue/10.1.1-18-s.js index 2f47b68fc4..e10da762e7 100644 --- a/test/language/directive-prologue/10.1.1-18-s.js +++ b/test/language/directive-prologue/10.1.1-18-s.js @@ -8,14 +8,14 @@ description: > PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(setter) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +var data = "data"; + +assert.throws(SyntaxError, function() { "use strict"; - try { + var obj = {}; - var data = "data"; Object.defineProperty(obj, "accProperty", { set: function (value) { eval("var public = 1;"); @@ -24,9 +24,6 @@ function testcase() { }); obj.accProperty = "overrideData"; - return false; - } catch (e) { - return e instanceof SyntaxError && data === "data"; - } - } -runTestCase(testcase); +}); + +assert.sameValue(data, "data", 'data unchanged'); diff --git a/test/language/directive-prologue/10.1.1-19-s.js b/test/language/directive-prologue/10.1.1-19-s.js index 54f186b5d5..44aefe2fa0 100644 --- a/test/language/directive-prologue/10.1.1-19-s.js +++ b/test/language/directive-prologue/10.1.1-19-s.js @@ -7,19 +7,14 @@ description: > Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the start of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function fun() { "use strict"; - try { + eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } } - return fun(); - } -runTestCase(testcase); + +assert.throws(SyntaxError, function() { + fun(); +}); diff --git a/test/language/directive-prologue/10.1.1-2-s.js b/test/language/directive-prologue/10.1.1-2-s.js index 550db34163..da0ba589e4 100644 --- a/test/language/directive-prologue/10.1.1-2-s.js +++ b/test/language/directive-prologue/10.1.1-2-s.js @@ -7,17 +7,10 @@ description: > Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +assert.throws(SyntaxError, function() { "use strict" - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); + eval("var public = 1;"); +}); diff --git a/test/language/directive-prologue/10.1.1-20-s.js b/test/language/directive-prologue/10.1.1-20-s.js index f99e0f6a67..be917dff80 100644 --- a/test/language/directive-prologue/10.1.1-20-s.js +++ b/test/language/directive-prologue/10.1.1-20-s.js @@ -7,15 +7,11 @@ description: > Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears in the middle of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function fun() { eval("var public = 1;"); "use strict"; - return public === 1; + assert.sameValue(public, 1); } - return fun(); - } -runTestCase(testcase); + fun(); diff --git a/test/language/directive-prologue/10.1.1-21-s.js b/test/language/directive-prologue/10.1.1-21-s.js index 2b63feda51..0aee78cf84 100644 --- a/test/language/directive-prologue/10.1.1-21-s.js +++ b/test/language/directive-prologue/10.1.1-21-s.js @@ -7,15 +7,10 @@ description: > Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the end of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ - -function testcase() { function fun() { eval("var public = 1;"); - return public === 1; + assert.sameValue(public, 1); "use strict"; } - return fun(); - } -runTestCase(testcase); + fun(); diff --git a/test/language/directive-prologue/10.1.1-22-s.js b/test/language/directive-prologue/10.1.1-22-s.js index d089eba585..fbfd7790b1 100644 --- a/test/language/directive-prologue/10.1.1-22-s.js +++ b/test/language/directive-prologue/10.1.1-22-s.js @@ -7,18 +7,10 @@ description: > Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the start of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - return function () { +assert.throws(SyntaxError, function () { "use strict"; - try { + eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } (); - } -runTestCase(testcase); +}); diff --git a/test/language/directive-prologue/10.1.1-23-s.js b/test/language/directive-prologue/10.1.1-23-s.js index 1d0f589c5e..98a4f1914c 100644 --- a/test/language/directive-prologue/10.1.1-23-s.js +++ b/test/language/directive-prologue/10.1.1-23-s.js @@ -7,14 +7,10 @@ description: > Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears in the middle of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - return function () { + (function () { eval("var public = 1;"); - return public === 1; + assert.sameValue(public, 1); "use strict"; - } (); - } -runTestCase(testcase); + }) (); diff --git a/test/language/directive-prologue/10.1.1-24-s.js b/test/language/directive-prologue/10.1.1-24-s.js index 8c539f2229..d74d1944cc 100644 --- a/test/language/directive-prologue/10.1.1-24-s.js +++ b/test/language/directive-prologue/10.1.1-24-s.js @@ -7,14 +7,11 @@ description: > Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the end of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - return function () { + (function () { eval("var public = 1;"); "use strict"; - return public === 1; - } (); - } -runTestCase(testcase); + + assert.sameValue(public, 1); + }) (); diff --git a/test/language/directive-prologue/10.1.1-26-s.js b/test/language/directive-prologue/10.1.1-26-s.js index 2a7fd468ec..103fed211c 100644 --- a/test/language/directive-prologue/10.1.1-26-s.js +++ b/test/language/directive-prologue/10.1.1-26-s.js @@ -8,13 +8,12 @@ description: > contains Use Strict Directive which appears at the start of the block(setter) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - try { +var data = "data"; + +assert.throws(SyntaxError, function() { var obj = {}; - var data = "data"; Object.defineProperty(obj, "accProperty", { set: function (value) { "use strict"; @@ -24,10 +23,6 @@ function testcase() { }); obj.accProperty = "overrideData"; +}); - return false; - } catch (e) { - return e instanceof SyntaxError && data === "data"; - } - } -runTestCase(testcase); +assert.sameValue(data, "data", 'data unchanged'); diff --git a/test/language/directive-prologue/10.1.1-27-s.js b/test/language/directive-prologue/10.1.1-27-s.js index eb2cb9a611..23ad02baec 100644 --- a/test/language/directive-prologue/10.1.1-27-s.js +++ b/test/language/directive-prologue/10.1.1-27-s.js @@ -8,10 +8,8 @@ description: > contains Use Strict Directive which appears in the middle of the block(getter) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "accProperty", { get: function () { @@ -20,6 +18,6 @@ function testcase() { return 11; } }); - return obj.accProperty === 11 && public === 1; - } -runTestCase(testcase); + +assert.sameValue(obj.accProperty, 11, 'obj.accProperty'); +assert.sameValue(public, 1, 'public'); diff --git a/test/language/directive-prologue/10.1.1-28-s.js b/test/language/directive-prologue/10.1.1-28-s.js index 7a00c10747..eb5fcbf29e 100644 --- a/test/language/directive-prologue/10.1.1-28-s.js +++ b/test/language/directive-prologue/10.1.1-28-s.js @@ -8,10 +8,8 @@ description: > contains Use Strict Directive which appears at the end of the block(setter) flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; var data; @@ -23,6 +21,5 @@ function testcase() { } }); obj.accProperty = "overrideData"; - return data==="overrideData"; - } -runTestCase(testcase); + +assert.sameValue(data, "overrideData", 'data'); diff --git a/test/language/directive-prologue/10.1.1-29-s.js b/test/language/directive-prologue/10.1.1-29-s.js index 720128592e..93258bdf72 100644 --- a/test/language/directive-prologue/10.1.1-29-s.js +++ b/test/language/directive-prologue/10.1.1-29-s.js @@ -7,13 +7,11 @@ description: > Strict Mode - The built-in Function constructor is contained in use strict code flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "use strict"; var funObj = new Function("a", "eval('public = 1;');"); funObj(); - return true; } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-3-s.js b/test/language/directive-prologue/10.1.1-3-s.js index 03d517ff0e..8794cfe841 100644 --- a/test/language/directive-prologue/10.1.1-3-s.js +++ b/test/language/directive-prologue/10.1.1-3-s.js @@ -7,13 +7,12 @@ description: > Strict Mode - Use Strict Directive Prologue is '' use strict';' which the first character is space flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { " use strict"; var public = 1; - return public === 1; + assert.sameValue(public, 1); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-31-s.js b/test/language/directive-prologue/10.1.1-31-s.js index 21bfaca47a..5509baf705 100644 --- a/test/language/directive-prologue/10.1.1-31-s.js +++ b/test/language/directive-prologue/10.1.1-31-s.js @@ -8,12 +8,11 @@ description: > contains Use Strict Directive which appears in the middle of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { + var funObj = new Function("a", "eval('public = 1;'); 'use strict'; anotherVariable = 2;"); funObj(); - return public === 1 && anotherVariable === 2; - } -runTestCase(testcase); + +assert.sameValue(public, 1, 'public'); +assert.sameValue(anotherVariable, 2, 'anotherVariable'); diff --git a/test/language/directive-prologue/10.1.1-32-s.js b/test/language/directive-prologue/10.1.1-32-s.js index 11bf5f5cfe..15d1de7264 100644 --- a/test/language/directive-prologue/10.1.1-32-s.js +++ b/test/language/directive-prologue/10.1.1-32-s.js @@ -7,12 +7,11 @@ description: > Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the end of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { + var funObj = new Function("a", "eval('public = 1;'); anotherVariable = 2; 'use strict';"); funObj(); - return public === 1 && anotherVariable === 2; - } -runTestCase(testcase); + +assert.sameValue(public, 1, 'public'); +assert.sameValue(anotherVariable, 2, 'anotherVariable'); diff --git a/test/language/directive-prologue/10.1.1-4-s.js b/test/language/directive-prologue/10.1.1-4-s.js index a50bf9f2b9..08e6ca7d9a 100644 --- a/test/language/directive-prologue/10.1.1-4-s.js +++ b/test/language/directive-prologue/10.1.1-4-s.js @@ -7,12 +7,12 @@ description: > Strict Mode - Use Strict Directive Prologue is ''use strict ';' which the last character is space flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "use strict "; var public = 1; - return public === 1; + + assert.sameValue(public, 1); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-5-s.js b/test/language/directive-prologue/10.1.1-5-s.js index a67f6d5559..d2a16af86a 100644 --- a/test/language/directive-prologue/10.1.1-5-s.js +++ b/test/language/directive-prologue/10.1.1-5-s.js @@ -7,17 +7,10 @@ description: > Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the beginning of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +assert.throws(SyntaxError, function() { "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); + eval("var public = 1;"); +}); diff --git a/test/language/directive-prologue/10.1.1-6-s.js b/test/language/directive-prologue/10.1.1-6-s.js index cdd58ce7a7..a11b7ab9bd 100644 --- a/test/language/directive-prologue/10.1.1-6-s.js +++ b/test/language/directive-prologue/10.1.1-6-s.js @@ -7,13 +7,14 @@ description: > Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears in the middle of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { var interface = 2; "use strict"; var public = 1; - return public === 1 && interface === 2; + + assert.sameValue(public, 1, 'public'); + assert.sameValue(interface, 2, 'interface'); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-7-s.js b/test/language/directive-prologue/10.1.1-7-s.js index afb189d15d..d4a0d545bb 100644 --- a/test/language/directive-prologue/10.1.1-7-s.js +++ b/test/language/directive-prologue/10.1.1-7-s.js @@ -7,12 +7,11 @@ description: > Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the end of the block flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { var public = 1; - return public === 1; + assert.sameValue(public, 1); "use strict"; } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/10.1.1-8-s.js b/test/language/directive-prologue/10.1.1-8-s.js index 8db8ae3632..1aada26577 100644 --- a/test/language/directive-prologue/10.1.1-8-s.js +++ b/test/language/directive-prologue/10.1.1-8-s.js @@ -7,17 +7,11 @@ description: > Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the directive prologue flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { +assert.throws(SyntaxError, function() { "use strict"; "use strict"; - try { + eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +}); diff --git a/test/language/directive-prologue/10.1.1-9-s.js b/test/language/directive-prologue/10.1.1-9-s.js index 0858cf41eb..1612c96961 100644 --- a/test/language/directive-prologue/10.1.1-9-s.js +++ b/test/language/directive-prologue/10.1.1-9-s.js @@ -7,12 +7,11 @@ description: > Strict Mode - Use Strict Directive Prologue is ''Use strict';' in which the first character is uppercase flags: [noStrict] -includes: [runTestCase.js] ---*/ function testcase() { "Use strict"; var public = 1; - return public === 1; + assert.sameValue(public, 1); } -runTestCase(testcase); +testcase(); diff --git a/test/language/directive-prologue/14.1-1-s.js b/test/language/directive-prologue/14.1-1-s.js index 9a7ef4a54f..9c7da4d6ce 100644 --- a/test/language/directive-prologue/14.1-1-s.js +++ b/test/language/directive-prologue/14.1-1-s.js @@ -5,17 +5,12 @@ es5id: 14.1-1-s description: "'use strict' directive - correct usage" flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; return(this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-10-s.js b/test/language/directive-prologue/14.1-10-s.js index 577f25ba94..eb6948b598 100644 --- a/test/language/directive-prologue/14.1-10-s.js +++ b/test/language/directive-prologue/14.1-10-s.js @@ -5,11 +5,8 @@ es5id: 14.1-10-s description: other directives - may follow 'use strict' directive flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { "use strict"; @@ -17,6 +14,4 @@ function testcase() { return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-11-s.js b/test/language/directive-prologue/14.1-11-s.js index 7f53f034bc..470e01cb32 100644 --- a/test/language/directive-prologue/14.1-11-s.js +++ b/test/language/directive-prologue/14.1-11-s.js @@ -5,11 +5,8 @@ es5id: 14.1-11-s description: comments may preceed 'use strict' directive flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { // comment @@ -19,6 +16,4 @@ function testcase() { } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-12-s.js b/test/language/directive-prologue/14.1-12-s.js index 4ab67194f4..40733e29e6 100644 --- a/test/language/directive-prologue/14.1-12-s.js +++ b/test/language/directive-prologue/14.1-12-s.js @@ -5,11 +5,8 @@ es5id: 14.1-12-s description: comments may follow 'use strict' directive flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { "use strict"; /* comment */ // comment @@ -17,6 +14,4 @@ function testcase() { return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-13-s.js b/test/language/directive-prologue/14.1-13-s.js index 6a89ac72dd..a846589a32 100644 --- a/test/language/directive-prologue/14.1-13-s.js +++ b/test/language/directive-prologue/14.1-13-s.js @@ -5,17 +5,12 @@ es5id: 14.1-13-s description: semicolon insertion works for'use strict' directive flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { "use strict" return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-14-s.js b/test/language/directive-prologue/14.1-14-s.js index 5def0451a6..0070258c14 100644 --- a/test/language/directive-prologue/14.1-14-s.js +++ b/test/language/directive-prologue/14.1-14-s.js @@ -5,11 +5,8 @@ es5id: 14.1-14-s description: semicolon insertion may come before 'use strict' directive flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { "another directive" @@ -17,6 +14,4 @@ function testcase() { return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-15-s.js b/test/language/directive-prologue/14.1-15-s.js index 22465b974f..65bd4bbca0 100644 --- a/test/language/directive-prologue/14.1-15-s.js +++ b/test/language/directive-prologue/14.1-15-s.js @@ -5,11 +5,8 @@ es5id: 14.1-15-s description: blank lines may come before 'use strict' directive flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { @@ -22,6 +19,4 @@ function testcase() { return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-16-s.js b/test/language/directive-prologue/14.1-16-s.js index ae87a4ba8d..5174141a95 100644 --- a/test/language/directive-prologue/14.1-16-s.js +++ b/test/language/directive-prologue/14.1-16-s.js @@ -7,17 +7,12 @@ description: > 'use strict' directive - not recognized if it follow an empty statement flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { ; 'use strict'; return (this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-17-s.js b/test/language/directive-prologue/14.1-17-s.js index 5124c4617f..cf3623e089 100644 --- a/test/language/directive-prologue/14.1-17-s.js +++ b/test/language/directive-prologue/14.1-17-s.js @@ -7,11 +7,8 @@ description: > 'use strict' directive - not recognized if it follow some other statment empty statement flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { var x; @@ -19,6 +16,4 @@ function testcase() { return (this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-2-s.js b/test/language/directive-prologue/14.1-2-s.js index 51f6de7e45..ec8078c0df 100644 --- a/test/language/directive-prologue/14.1-2-s.js +++ b/test/language/directive-prologue/14.1-2-s.js @@ -5,17 +5,12 @@ es5id: 14.1-2-s description: "\"use strict\" directive - correct usage double quotes" flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { "use strict"; return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-3-s.js b/test/language/directive-prologue/14.1-3-s.js index f3d78f9969..a1b7531f93 100644 --- a/test/language/directive-prologue/14.1-3-s.js +++ b/test/language/directive-prologue/14.1-3-s.js @@ -7,17 +7,12 @@ description: > 'use strict' directive - not recognized if it contains extra whitespace flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { ' use strict '; return (this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-4-s.js b/test/language/directive-prologue/14.1-4-s.js index 0db7af2afa..6946de41c9 100644 --- a/test/language/directive-prologue/14.1-4-s.js +++ b/test/language/directive-prologue/14.1-4-s.js @@ -7,11 +7,8 @@ description: > 'use strict' directive - not recognized if contains Line Continuation flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use str\ @@ -19,6 +16,4 @@ ict'; return (this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-5-s.js b/test/language/directive-prologue/14.1-5-s.js index 3c854e294a..f89d359954 100644 --- a/test/language/directive-prologue/14.1-5-s.js +++ b/test/language/directive-prologue/14.1-5-s.js @@ -7,17 +7,12 @@ description: > 'use strict' directive - not recognized if contains a EscapeSequence flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use\u0020strict'; return(this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-6-s.js b/test/language/directive-prologue/14.1-6-s.js index 7e9e2777b5..e51fff1174 100644 --- a/test/language/directive-prologue/14.1-6-s.js +++ b/test/language/directive-prologue/14.1-6-s.js @@ -7,17 +7,12 @@ description: > 'use strict' directive - not recognized if contains a instead of a space flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; return (this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-7-s.js b/test/language/directive-prologue/14.1-7-s.js index 5ae4bea95e..428cc3ebb1 100644 --- a/test/language/directive-prologue/14.1-7-s.js +++ b/test/language/directive-prologue/14.1-7-s.js @@ -5,17 +5,12 @@ es5id: 14.1-7-s description: "'use strict' directive - not recognized if upper case" flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'Use Strict'; return (this !== undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-8-s.js b/test/language/directive-prologue/14.1-8-s.js index a332fa7ce9..0943548907 100644 --- a/test/language/directive-prologue/14.1-8-s.js +++ b/test/language/directive-prologue/14.1-8-s.js @@ -5,11 +5,8 @@ es5id: 14.1-8-s description: "'use strict' directive - may follow other directives" flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { "bogus directive"; @@ -17,6 +14,4 @@ function testcase() { return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined)); diff --git a/test/language/directive-prologue/14.1-9-s.js b/test/language/directive-prologue/14.1-9-s.js index 476de111be..50ba36c426 100644 --- a/test/language/directive-prologue/14.1-9-s.js +++ b/test/language/directive-prologue/14.1-9-s.js @@ -5,11 +5,8 @@ es5id: 14.1-9-s description: "'use strict' directive - may occur multiple times" flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function foo() { 'use strict'; @@ -17,6 +14,4 @@ function testcase() { return (this === undefined); } - return foo.call(undefined); - } -runTestCase(testcase); +assert(foo.call(undefined));