diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js index 48e2022819e004c8ff6e7c86dc3ef7678170e425..81e5e81e696941d0efcb6b25918e099fca0cf128 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A6.1_T2.js @@ -5,7 +5,6 @@ info: Array.prototype.splice sets `length` on `this` es5id: 15.4.4.12_A6.1_T2 description: Array.prototype.splice throws if `length` is read-only -negative: TypeError ---*/ var a = [0, 1, 2]; @@ -14,4 +13,6 @@ Object.defineProperty(a, 'length', { writable: false }); -a.splice(1, 2, 4); +assert.throws(TypeError, function() { + a.splice(1, 2, 4); +}); diff --git a/test/built-ins/Function/15.3.5-2gs.js b/test/built-ins/Function/15.3.5-2gs.js index 3aa842ed59fe5253801288962b681aef2fa88369..7a63f57c39fff7a272ec551e0352dd1ab70d4b43 100644 --- a/test/built-ins/Function/15.3.5-2gs.js +++ b/test/built-ins/Function/15.3.5-2gs.js @@ -9,10 +9,11 @@ es5id: 15.3.5-2gs description: > StrictMode - error is thrown when reading the 'caller' property of a function object -negative: TypeError flags: [onlyStrict] ---*/ function _15_3_5_1_gs() {} -_15_3_5_1_gs.caller; -throw NotEarlyError; + +assert.throws(TypeError, function() { + _15_3_5_1_gs.caller; +}); diff --git a/test/built-ins/Function/15.3.5.4_2-10gs.js b/test/built-ins/Function/15.3.5.4_2-10gs.js index 6f20e83a7fe52aede6ed38e080493e081a42d426..54774c8787b1d9c7c76c4fb2eb137684da7af253 100644 --- a/test/built-ins/Function/15.3.5.4_2-10gs.js +++ b/test/built-ins/Function/15.3.5.4_2-10gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (New'ed Function constructor includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ var f = new Function("\"use strict\";\nreturn gNonStrict();"); -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-11gs.js b/test/built-ins/Function/15.3.5.4_2-11gs.js index 663188a3c26139364679f3659d04ac4d8c93e669..17d56e4f0dbb2b7854e12da75cb229f5d464b2ef 100644 --- a/test/built-ins/Function/15.3.5.4_2-11gs.js +++ b/test/built-ins/Function/15.3.5.4_2-11gs.js @@ -9,11 +9,12 @@ es5id: 15.3.5.4_2-11gs description: > Strict mode - checking access to strict function caller from strict function (eval used within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ -eval("gNonStrict();"); +assert.throws(TypeError, function() { + eval("gNonStrict();"); +}); function gNonStrict() { diff --git a/test/built-ins/Function/15.3.5.4_2-13gs.js b/test/built-ins/Function/15.3.5.4_2-13gs.js index 5f012c04ea7b2c84ff8aa5f7a6b0b1a4c55accda..5d0163077749d6b8d3dc96a1c2dfdc5d57c9e669 100644 --- a/test/built-ins/Function/15.3.5.4_2-13gs.js +++ b/test/built-ins/Function/15.3.5.4_2-13gs.js @@ -9,13 +9,14 @@ es5id: 15.3.5.4_2-13gs description: > Strict mode - checking access to non-strict function caller from strict function (indirect eval used within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var my_eval = eval; -my_eval("gNonStrict();"); +assert.throws(TypeError, function() { + my_eval("gNonStrict();"); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-15gs.js b/test/built-ins/Function/15.3.5.4_2-15gs.js index 168f054d6703ed76491167300949e194164e64f1..53ca5076724c62624452559c8ee04a0717a5ac62 100644 --- a/test/built-ins/Function/15.3.5.4_2-15gs.js +++ b/test/built-ins/Function/15.3.5.4_2-15gs.js @@ -10,15 +10,16 @@ description: > Strict mode - checking access to strict function caller from strict function (New'ed object from FunctionDeclaration defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ function f() { return gNonStrict(); } -new f(); +assert.throws(TypeError, function() { + new f(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-16gs.js b/test/built-ins/Function/15.3.5.4_2-16gs.js index 7a8a62e6aa1d88e6ad093eea653b4ce537cd8920..e37a53df1591b825150603d9850a19d25b62cdd9 100644 --- a/test/built-ins/Function/15.3.5.4_2-16gs.js +++ b/test/built-ins/Function/15.3.5.4_2-16gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (New'ed object from FunctionDeclaration includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -18,8 +17,10 @@ function f() { "use strict"; return gNonStrict(); } -new f(); +assert.throws(TypeError, function() { + new f(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-17gs.js b/test/built-ins/Function/15.3.5.4_2-17gs.js index 2b9c315cfc836ef0ae178545be5b156eecd4882c..2a6ec5fe3730a77821c60ad3a1a8f96942d9940e 100644 --- a/test/built-ins/Function/15.3.5.4_2-17gs.js +++ b/test/built-ins/Function/15.3.5.4_2-17gs.js @@ -10,15 +10,16 @@ description: > Strict mode - checking access to strict function caller from strict function (New'ed object from FunctionExpression defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var f = function () { return gNonStrict(); } -new f(); +assert.throws(TypeError, function() { + new f(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-18gs.js b/test/built-ins/Function/15.3.5.4_2-18gs.js index 27144a2b6617745b40506d8fcb14d7260b62743e..66026b9e0ba18cc3dd40676911d8ea163aa8e652 100644 --- a/test/built-ins/Function/15.3.5.4_2-18gs.js +++ b/test/built-ins/Function/15.3.5.4_2-18gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (New'ed object from FunctionExpression includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -18,8 +17,10 @@ var f = function () { "use strict"; return gNonStrict(); } -new f(); +assert.throws(TypeError, function() { + new f(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-19gs.js b/test/built-ins/Function/15.3.5.4_2-19gs.js index a0debb3274ab20d57ebf129178c9b63e2f924b43..4f30216db211a92d881ec7d531949f71611ae444 100644 --- a/test/built-ins/Function/15.3.5.4_2-19gs.js +++ b/test/built-ins/Function/15.3.5.4_2-19gs.js @@ -10,15 +10,15 @@ description: > Strict mode - checking access to strict function caller from strict function (New'ed object from Anonymous FunctionExpression defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ -var obj = new (function () { - return gNonStrict(); +assert.throws(TypeError, function() { + var obj = new (function () { + return gNonStrict(); + }); }); - function gNonStrict() { return gNonStrict.caller; } diff --git a/test/built-ins/Function/15.3.5.4_2-1gs.js b/test/built-ins/Function/15.3.5.4_2-1gs.js index 774c4108f3f2cfb36e02fd1107b38bab691664c2..e7e07e2be926dcb327214c5290d3811188a46009 100644 --- a/test/built-ins/Function/15.3.5.4_2-1gs.js +++ b/test/built-ins/Function/15.3.5.4_2-1gs.js @@ -9,15 +9,16 @@ es5id: 15.3.5.4_2-1gs description: > Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ function f() { return gNonStrict(); } -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-20gs.js b/test/built-ins/Function/15.3.5.4_2-20gs.js index 971f563351d8390361b53ed6c41fdb376c9a73bc..63caddf64f4f52833eba36f34ed5d9aed78d44af 100644 --- a/test/built-ins/Function/15.3.5.4_2-20gs.js +++ b/test/built-ins/Function/15.3.5.4_2-20gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (New'ed object from Anonymous FunctionExpression includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ -var obj = new (function () { - "use strict"; - return gNonStrict(); +assert.throws(TypeError, function() { + var obj = new (function () { + "use strict"; + return gNonStrict(); + }); }); diff --git a/test/built-ins/Function/15.3.5.4_2-21gs.js b/test/built-ins/Function/15.3.5.4_2-21gs.js index d50f5f4891f30f311c6de42ec669563f84e449ab..e0f6b8d8899ec72f4d9ba2c8c65503c43316b9f3 100644 --- a/test/built-ins/Function/15.3.5.4_2-21gs.js +++ b/test/built-ins/Function/15.3.5.4_2-21gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ @@ -20,8 +19,10 @@ function f1() { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-22gs.js b/test/built-ins/Function/15.3.5.4_2-22gs.js index 3277bc67121368d6df91ac39c6252963a5db1816..ce27a377dd0b4beaea99d6fbd8caa42d741a4ffe 100644 --- a/test/built-ins/Function/15.3.5.4_2-22gs.js +++ b/test/built-ins/Function/15.3.5.4_2-22gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within a FunctionDeclaration inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ @@ -20,8 +19,10 @@ function f1() { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-23gs.js b/test/built-ins/Function/15.3.5.4_2-23gs.js index 8f0d3b9ac2ddb9e2823783bb60f2abbaba63eeae..024e80d898e10f79fe51be0bc6501f3b4dd96b1f 100644 --- a/test/built-ins/Function/15.3.5.4_2-23gs.js +++ b/test/built-ins/Function/15.3.5.4_2-23gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ @@ -19,8 +18,10 @@ function f1() { return gNonStrict(); })(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-24gs.js b/test/built-ins/Function/15.3.5.4_2-24gs.js index 4ef8a3bc3b7ddb9cfee0f1777b7ecb28cc353959..f87741dcfe5d086a5a5cbf62faf5e39bde8db13b 100644 --- a/test/built-ins/Function/15.3.5.4_2-24gs.js +++ b/test/built-ins/Function/15.3.5.4_2-24gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within a FunctionExpression inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ @@ -20,7 +19,10 @@ var f1 = function () { } return f(); } -f1(); + +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { diff --git a/test/built-ins/Function/15.3.5.4_2-25gs.js b/test/built-ins/Function/15.3.5.4_2-25gs.js index 37709ee2b6298acf2309a10732580cf1de3d2f12..57974582292d9e1257a393938a05dec0e21ee3fb 100644 --- a/test/built-ins/Function/15.3.5.4_2-25gs.js +++ b/test/built-ins/Function/15.3.5.4_2-25gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within a FunctionExpression inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ @@ -20,8 +19,10 @@ var f1 = function () { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-26gs.js b/test/built-ins/Function/15.3.5.4_2-26gs.js index 8783862cb20d0efbcdf71e507fc90a75120c0045..b992d1834a902f9f401874cbc37136ee09720ea0 100644 --- a/test/built-ins/Function/15.3.5.4_2-26gs.js +++ b/test/built-ins/Function/15.3.5.4_2-26gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ @@ -19,8 +18,10 @@ var f1 = function () { return gNonStrict(); })(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-27gs.js b/test/built-ins/Function/15.3.5.4_2-27gs.js index 459334411b67d379c851efc56dad920f763f5925..52cabec44633bd6f78ca455aaa5744128d9723de 100644 --- a/test/built-ins/Function/15.3.5.4_2-27gs.js +++ b/test/built-ins/Function/15.3.5.4_2-27gs.js @@ -10,17 +10,17 @@ description: > Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ -(function () { - function f() { - return gNonStrict(); - } - return f(); -})(); - +assert.throws(TypeError, function() { + (function () { + function f() { + return gNonStrict(); + } + return f(); + })(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-28gs.js b/test/built-ins/Function/15.3.5.4_2-28gs.js index 1a64f6db1690ff97db2ebb5fa3ca8263ee863898..aa6a6d36f610cc8406cbb183c79928475f050c46 100644 --- a/test/built-ins/Function/15.3.5.4_2-28gs.js +++ b/test/built-ins/Function/15.3.5.4_2-28gs.js @@ -10,16 +10,17 @@ description: > Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ -(function () { - var f = function () { - return gNonStrict(); - } - return f(); -})(); +assert.throws(TypeError, function() { + (function () { + var f = function () { + return gNonStrict(); + } + return f(); + })(); +}); function gNonStrict() { diff --git a/test/built-ins/Function/15.3.5.4_2-29gs.js b/test/built-ins/Function/15.3.5.4_2-29gs.js index 096551395da853543572ffb67f88e11eb41e93bd..2ca5aa3f54c6064ee48c2681c245daa510b432d6 100644 --- a/test/built-ins/Function/15.3.5.4_2-29gs.js +++ b/test/built-ins/Function/15.3.5.4_2-29gs.js @@ -10,16 +10,16 @@ description: > Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) -negative: TypeError flags: [onlyStrict] ---*/ -(function () { - return (function () { - return gNonStrict(); +assert.throws(TypeError, function() { + (function () { + return (function () { + return gNonStrict(); + })(); })(); -})(); - +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-2gs.js b/test/built-ins/Function/15.3.5.4_2-2gs.js index fd5ac04813ac44d7429abce1a071247cd4aac5fc..0275f2fbcc9e746c2f4c1d187f5b7134c3b6c13b 100644 --- a/test/built-ins/Function/15.3.5.4_2-2gs.js +++ b/test/built-ins/Function/15.3.5.4_2-2gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -18,8 +17,10 @@ function f() { "use strict"; return gNonStrict(); } -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-30gs.js b/test/built-ins/Function/15.3.5.4_2-30gs.js index ac0b1a15d4cfe9f19bf6293379ee3bbcdcbc4cc2..e7628e0d408ad0ab57f3fdbff4350992e31e9fcc 100644 --- a/test/built-ins/Function/15.3.5.4_2-30gs.js +++ b/test/built-ins/Function/15.3.5.4_2-30gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -21,8 +20,10 @@ function f1() { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-31gs.js b/test/built-ins/Function/15.3.5.4_2-31gs.js index d42b29487a090320444af1ba60284171e0ef1c90..b697483c0d48aa2ae3d34393598c3dba31944630 100644 --- a/test/built-ins/Function/15.3.5.4_2-31gs.js +++ b/test/built-ins/Function/15.3.5.4_2-31gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -21,8 +20,10 @@ function f1() { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-32gs.js b/test/built-ins/Function/15.3.5.4_2-32gs.js index d68ad78f802b86494791db6e1f7d26ecbd897fb6..14da54ddb3f98b6524c547d3840b509e2df182f9 100644 --- a/test/built-ins/Function/15.3.5.4_2-32gs.js +++ b/test/built-ins/Function/15.3.5.4_2-32gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -20,8 +19,10 @@ function f1() { return gNonStrict(); })(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-33gs.js b/test/built-ins/Function/15.3.5.4_2-33gs.js index d20b91948d173682e29e0e5cade5df4ccebc9c78..1d97446859a2f73fbc30fcb0b4dbb7a04791fbd9 100644 --- a/test/built-ins/Function/15.3.5.4_2-33gs.js +++ b/test/built-ins/Function/15.3.5.4_2-33gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -21,8 +20,10 @@ var f1 = function () { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-34gs.js b/test/built-ins/Function/15.3.5.4_2-34gs.js index 746402fce00c36d9069a73fa87780cb373c035c8..d1a5c894083ecb67c5820516c30c244bb47342a6 100644 --- a/test/built-ins/Function/15.3.5.4_2-34gs.js +++ b/test/built-ins/Function/15.3.5.4_2-34gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression defined within a FunctionExpression with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -21,8 +20,10 @@ var f1 = function () { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-35gs.js b/test/built-ins/Function/15.3.5.4_2-35gs.js index 793a368bc7b1c0b7f2ebb405b31931c19260cfc9..67f14b0cac677c7944da4a0204df51c7f944cb70 100644 --- a/test/built-ins/Function/15.3.5.4_2-35gs.js +++ b/test/built-ins/Function/15.3.5.4_2-35gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -20,8 +19,10 @@ var f1 = function () { return gNonStrict(); })(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-36gs.js b/test/built-ins/Function/15.3.5.4_2-36gs.js index b8ead0498738f5bf206fa1680896ec3390c4fc58..a1e5dc1d02e613f284b812ebea14166ff1c686f4 100644 --- a/test/built-ins/Function/15.3.5.4_2-36gs.js +++ b/test/built-ins/Function/15.3.5.4_2-36gs.js @@ -10,18 +10,18 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ -(function () { - "use strict"; - function f() { - return gNonStrict(); - } - return f(); -})(); - +assert.throws(TypeError, function() { + (function () { + "use strict"; + function f() { + return gNonStrict(); + } + return f(); + })(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-37gs.js b/test/built-ins/Function/15.3.5.4_2-37gs.js index 40fdde3b89cfccf9afb3d245f20bc10b675a6696..98f865466527b51dafdc72f9100eaffd31561827 100644 --- a/test/built-ins/Function/15.3.5.4_2-37gs.js +++ b/test/built-ins/Function/15.3.5.4_2-37gs.js @@ -10,18 +10,18 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ -(function () { - "use strict"; - var f = function () { - return gNonStrict(); - } - return f(); -})(); - +assert.throws(TypeError, function() { + (function () { + "use strict"; + var f = function () { + return gNonStrict(); + } + return f(); + })(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-38gs.js b/test/built-ins/Function/15.3.5.4_2-38gs.js index a674f347ed2db56c84487b65ce3f7df7dee78196..fcb7a674c3f7201bf34f051d903ac50983e169ed 100644 --- a/test/built-ins/Function/15.3.5.4_2-38gs.js +++ b/test/built-ins/Function/15.3.5.4_2-38gs.js @@ -10,17 +10,17 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ -(function () { - "use strict"; - return (function () { - return gNonStrict(); +assert.throws(TypeError, function() { + (function () { + "use strict"; + return (function () { + return gNonStrict(); + })(); })(); -})(); - +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-39gs.js b/test/built-ins/Function/15.3.5.4_2-39gs.js index 0693406ed31786c0c786a35b082d79390e7ff837..dce9ca72a4a1930f0e91912f7c4547781af73de8 100644 --- a/test/built-ins/Function/15.3.5.4_2-39gs.js +++ b/test/built-ins/Function/15.3.5.4_2-39gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) -negative: TypeError flags: [noStrict] ---*/ @@ -22,8 +21,10 @@ function f1() { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-3gs.js b/test/built-ins/Function/15.3.5.4_2-3gs.js index 97a70135f205b2c2846b404bccc0ffa92bd37109..aacfb716c236feaba1579e0560e50da6befd1734 100644 --- a/test/built-ins/Function/15.3.5.4_2-3gs.js +++ b/test/built-ins/Function/15.3.5.4_2-3gs.js @@ -9,15 +9,16 @@ es5id: 15.3.5.4_2-3gs description: > Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var f = function () { return gNonStrict(); } -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-40gs.js b/test/built-ins/Function/15.3.5.4_2-40gs.js index 96c73d20ae5183dc0c6cce7ad3505e676465b7ac..b6ad008dcd6bd039411adac9080f0d8ac5f328d3 100644 --- a/test/built-ins/Function/15.3.5.4_2-40gs.js +++ b/test/built-ins/Function/15.3.5.4_2-40gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) -negative: TypeError flags: [noStrict] ---*/ @@ -22,8 +21,10 @@ function f1() { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-41gs.js b/test/built-ins/Function/15.3.5.4_2-41gs.js index 6a1137b9904e635eb1e4c45590ac0bf50095a8f0..81d15c87f09546d02e845fb97f99f24bbb11475f 100644 --- a/test/built-ins/Function/15.3.5.4_2-41gs.js +++ b/test/built-ins/Function/15.3.5.4_2-41gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) -negative: TypeError flags: [noStrict] ---*/ @@ -21,8 +20,10 @@ function f1() { return r; })(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-42gs.js b/test/built-ins/Function/15.3.5.4_2-42gs.js index a2ee3010661e6755ef98ee032007dd44590ba20d..421f1aaa04aadd22ca6b89c6d7bfdd90c0e32494 100644 --- a/test/built-ins/Function/15.3.5.4_2-42gs.js +++ b/test/built-ins/Function/15.3.5.4_2-42gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) -negative: TypeError flags: [noStrict] ---*/ @@ -22,8 +21,10 @@ var f1 = function () { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-43gs.js b/test/built-ins/Function/15.3.5.4_2-43gs.js index 8febd8c451e843a394a39b1c28c8b7ddd8e4d1e5..9614b0cc7557a071c9a9726fe5c83fd293d52bd1 100644 --- a/test/built-ins/Function/15.3.5.4_2-43gs.js +++ b/test/built-ins/Function/15.3.5.4_2-43gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression with a strict directive prologue defined within a FunctionExpression) -negative: TypeError flags: [noStrict] ---*/ @@ -22,8 +21,10 @@ var f1 = function () { } return f(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-44gs.js b/test/built-ins/Function/15.3.5.4_2-44gs.js index eb1a6974a13fd2d4db2c3c0ba4430de58cac5773..99b2e61a9649438bba9f7e46be1fabc10a2ee161 100644 --- a/test/built-ins/Function/15.3.5.4_2-44gs.js +++ b/test/built-ins/Function/15.3.5.4_2-44gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) -negative: TypeError flags: [noStrict] ---*/ @@ -21,8 +20,10 @@ var f1 = function () { return r; })(); } -f1(); +assert.throws(TypeError, function() { + f1(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-45gs.js b/test/built-ins/Function/15.3.5.4_2-45gs.js index 2659a6b06ff27c57bcf5a66e8034fdc7cf1a157a..01de452815a11dc6618f4aa57b1240d21a0ad788 100644 --- a/test/built-ins/Function/15.3.5.4_2-45gs.js +++ b/test/built-ins/Function/15.3.5.4_2-45gs.js @@ -10,19 +10,19 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) -negative: TypeError flags: [noStrict] ---*/ -(function () { - function f() { - "use strict"; - var r = gNonStrict(); - return r; - } - return f(); -})(); - +assert.throws(TypeError, function() { + (function () { + function f() { + "use strict"; + var r = gNonStrict(); + return r; + } + return f(); + })(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-46gs.js b/test/built-ins/Function/15.3.5.4_2-46gs.js index 26d486fe04cfaa4f81862521b8865f66631ec9d0..f2aafe6fdcdd415daa26f7460d7193d12f2999df 100644 --- a/test/built-ins/Function/15.3.5.4_2-46gs.js +++ b/test/built-ins/Function/15.3.5.4_2-46gs.js @@ -10,19 +10,19 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) -negative: TypeError flags: [noStrict] ---*/ -(function () { - var f = function () { - "use strict"; - var r = gNonStrict(); - return r; - } - return f(); -})(); - +assert.throws(TypeError, function() { + (function () { + var f = function () { + "use strict"; + var r = gNonStrict(); + return r; + } + return f(); + })(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-47gs.js b/test/built-ins/Function/15.3.5.4_2-47gs.js index 6b9e4b3097cbb5e6820bb818e2c8f408ba239c52..dc6f8fed98c3828417ff61d27fdcb9a9513fd80f 100644 --- a/test/built-ins/Function/15.3.5.4_2-47gs.js +++ b/test/built-ins/Function/15.3.5.4_2-47gs.js @@ -10,17 +10,18 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) -negative: TypeError flags: [noStrict] ---*/ -(function () { - return (function () { - "use strict"; - var r = gNonStrict(); - return r; +assert.throws(TypeError, function() { + (function () { + return (function () { + "use strict"; + var r = gNonStrict(); + return r; + })(); })(); -})(); +}); function gNonStrict() { diff --git a/test/built-ins/Function/15.3.5.4_2-48gs.js b/test/built-ins/Function/15.3.5.4_2-48gs.js index 31cc8de3ddf9ed11bdb87bf3a02e947231e0970a..1af2e4b9f7ac5482ea81ff5eba8b73d80e7311ed 100644 --- a/test/built-ins/Function/15.3.5.4_2-48gs.js +++ b/test/built-ins/Function/15.3.5.4_2-48gs.js @@ -9,13 +9,14 @@ es5id: 15.3.5.4_2-48gs description: > Strict mode - checking access to strict function caller from strict function (Literal getter defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var o = { get foo() { return gNonStrict(); } } -o.foo; +assert.throws(TypeError, function() { + o.foo; +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-49gs.js b/test/built-ins/Function/15.3.5.4_2-49gs.js index 09bd2b8c364f9dc3a309085bb38c5bd9fdbb7257..927e272f1e52540683fd2d4704756905e7a1bc34 100644 --- a/test/built-ins/Function/15.3.5.4_2-49gs.js +++ b/test/built-ins/Function/15.3.5.4_2-49gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Literal getter includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ var o = { get foo() { "use strict"; return gNonStrict(); } } -o.foo; +assert.throws(TypeError, function() { + o.foo; +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-4gs.js b/test/built-ins/Function/15.3.5.4_2-4gs.js index 03aa0b5271d0d1b735bf8e819fa20f11e2696add..0cb4abe242bff9240fc94b16b4ca82d0df3178f6 100644 --- a/test/built-ins/Function/15.3.5.4_2-4gs.js +++ b/test/built-ins/Function/15.3.5.4_2-4gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function (FunctionExpression includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -18,8 +17,10 @@ var f = function () { "use strict"; return gNonStrict(); } -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-50gs.js b/test/built-ins/Function/15.3.5.4_2-50gs.js index f36f3502381f0203cb84bd4d376df27db69ddba6..2944d945753cc4ce9f746fc7c24d835c76ecbf9e 100644 --- a/test/built-ins/Function/15.3.5.4_2-50gs.js +++ b/test/built-ins/Function/15.3.5.4_2-50gs.js @@ -9,13 +9,14 @@ es5id: 15.3.5.4_2-50gs description: > Strict mode - checking access to strict function caller from strict function (Literal setter defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var o = { set foo(stuff) { return gNonStrict(); } } -o.foo = 7; +assert.throws(TypeError, function() { + o.foo = 7; +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-51gs.js b/test/built-ins/Function/15.3.5.4_2-51gs.js index f42f183e24763da9b803d900be73c6f08185209c..20b24eabcbe42bdf531be972ba4027f991321e79 100644 --- a/test/built-ins/Function/15.3.5.4_2-51gs.js +++ b/test/built-ins/Function/15.3.5.4_2-51gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Literal setter includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ var o = { set foo(stuff) { "use strict"; return gNonStrict(); } } -o.foo = 8; +assert.throws(TypeError, function() { + o.foo = 8; +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-52gs.js b/test/built-ins/Function/15.3.5.4_2-52gs.js index cdee4535009fd0edec734b41d744c3adad3cd310..0a1c95e7e241b6df4f197b8cc2072278fe8fff30 100644 --- a/test/built-ins/Function/15.3.5.4_2-52gs.js +++ b/test/built-ins/Function/15.3.5.4_2-52gs.js @@ -9,14 +9,15 @@ es5id: 15.3.5.4_2-52gs description: > Strict mode - checking access to strict function caller from strict function (Injected getter defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var o = {}; Object.defineProperty(o, "foo", { get: function() { return gNonStrict(); } }); -o.foo; +assert.throws(TypeError, function() { + o.foo; +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-53gs.js b/test/built-ins/Function/15.3.5.4_2-53gs.js index 290912cad0f123055386e9a432a3ec35f9912530..3621e66fc9703c3ce09ab7a44ae24b84b2bbda9d 100644 --- a/test/built-ins/Function/15.3.5.4_2-53gs.js +++ b/test/built-ins/Function/15.3.5.4_2-53gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Injected getter includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ var o = {}; Object.defineProperty(o, "foo", { get: function() { "use strict"; return gNonStrict(); } }); -o.foo; +assert.throws(TypeError, function() { + o.foo; +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-54gs.js b/test/built-ins/Function/15.3.5.4_2-54gs.js index c6df0374b5f891fe6c4ef8e99b688254d9210d7d..c36a6ac48aa9d5a3c990a660487871730389fa58 100644 --- a/test/built-ins/Function/15.3.5.4_2-54gs.js +++ b/test/built-ins/Function/15.3.5.4_2-54gs.js @@ -9,14 +9,15 @@ es5id: 15.3.5.4_2-54gs description: > Strict mode - checking access to strict function caller from strict function (Injected setter defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var o = {}; Object.defineProperty(o, "foo", { set: function(stuff) { return gNonStrict(); } }); -o.foo = 9; +assert.throws(TypeError, function() { + o.foo = 9; +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-55gs.js b/test/built-ins/Function/15.3.5.4_2-55gs.js index 9c083fa5f24d7a20ca534b66ccbaadcbdcd0f28a..cf6996582f824cf71bad12b1d76eb8095686f71f 100644 --- a/test/built-ins/Function/15.3.5.4_2-55gs.js +++ b/test/built-ins/Function/15.3.5.4_2-55gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Injected setter includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ var o = {}; Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; return gNonStrict(); } }); -o.foo = 10; +assert.throws(TypeError, function() { + o.foo = 10; +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-56gs.js b/test/built-ins/Function/15.3.5.4_2-56gs.js index 8e2ce201b96684983808f5d928b7d871864bfe74..34ba187c7702b1357a4bba5b8ee4a066417c1f80 100644 --- a/test/built-ins/Function/15.3.5.4_2-56gs.js +++ b/test/built-ins/Function/15.3.5.4_2-56gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict function declaration) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; var r = gNonStrict(); return r;}; function foo() { return f();} -foo(); +assert.throws(TypeError, function() { + foo(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-57gs.js b/test/built-ins/Function/15.3.5.4_2-57gs.js index d37d5bf8f666fc727e1ded87edca021bce14ab73..3e1f155c7ca56c2ecec7fab9f4ec4099b93463cc 100644 --- a/test/built-ins/Function/15.3.5.4_2-57gs.js +++ b/test/built-ins/Function/15.3.5.4_2-57gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict eval) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -eval("f();"); +assert.throws(TypeError, function() { + eval("f();"); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-58gs.js b/test/built-ins/Function/15.3.5.4_2-58gs.js index 80326c9b26bf9bacd49eb7e20e7e4ab015f3798e..df0b72fa47ba885013d2f35d3a67afac5c50dcd4 100644 --- a/test/built-ins/Function/15.3.5.4_2-58gs.js +++ b/test/built-ins/Function/15.3.5.4_2-58gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict Function constructor) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; var r = gNonStrict(); return r;}; -Function("return f();")(); +assert.throws(TypeError, function() { + Function("return f();")(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-59gs.js b/test/built-ins/Function/15.3.5.4_2-59gs.js index 134f23f5b4b3244c113854073f6fc36328b65968..b8bf5e9fc20e684d3b5e21a72ebbd72c7ee5bf47 100644 --- a/test/built-ins/Function/15.3.5.4_2-59gs.js +++ b/test/built-ins/Function/15.3.5.4_2-59gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict new'ed Function constructor) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; var r = gNonStrict(); return r;}; -new Function("return f();")(); +assert.throws(TypeError, function() { + new Function("return f();")(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-5gs.js b/test/built-ins/Function/15.3.5.4_2-5gs.js index 8d79c341d9a7ca8ad11881c46db9e96ff44c4c78..1a432f1aa1e599fdf09e893b6584459878fb4cfe 100644 --- a/test/built-ins/Function/15.3.5.4_2-5gs.js +++ b/test/built-ins/Function/15.3.5.4_2-5gs.js @@ -10,14 +10,14 @@ description: > Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ -(function () { - return gNonStrict(); -})(); - +assert.throws(TypeError, function() { + (function () { + return gNonStrict(); + })(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-60gs.js b/test/built-ins/Function/15.3.5.4_2-60gs.js index 830aeab7cc6db6879a5c998040a67a90410d4cfe..15c7196364966f5e1beac574521b0aeefe5c92e3 100644 --- a/test/built-ins/Function/15.3.5.4_2-60gs.js +++ b/test/built-ins/Function/15.3.5.4_2-60gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply()) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.apply(); +assert.throws(TypeError, function() { + f.apply(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-61gs.js b/test/built-ins/Function/15.3.5.4_2-61gs.js index 614ead17e557aef8d3c23eaf485422e744770183..e60e75236295577c71f71fd529b60cda79c658eb 100644 --- a/test/built-ins/Function/15.3.5.4_2-61gs.js +++ b/test/built-ins/Function/15.3.5.4_2-61gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(null)) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.apply(null); +assert.throws(TypeError, function() { + f.apply(null); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-62gs.js b/test/built-ins/Function/15.3.5.4_2-62gs.js index 2122928e97864908ecdfc6523aa6b83a38eda58c..c83f7a7103eae9da2f026efe663261fb0e9d183f 100644 --- a/test/built-ins/Function/15.3.5.4_2-62gs.js +++ b/test/built-ins/Function/15.3.5.4_2-62gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(undefined)) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.apply(undefined); +assert.throws(TypeError, function() { + f.apply(undefined); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-63gs.js b/test/built-ins/Function/15.3.5.4_2-63gs.js index 7d411a22aa60ed03b556cf25d989343a0ede092b..341dae5cf6b5b68e51a705e91395f596cec4fa18 100644 --- a/test/built-ins/Function/15.3.5.4_2-63gs.js +++ b/test/built-ins/Function/15.3.5.4_2-63gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(someObject)) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; var o = {}; -f.apply(o); +assert.throws(TypeError, function() { + f.apply(o); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-64gs.js b/test/built-ins/Function/15.3.5.4_2-64gs.js index 0f57ff132af02725844a7f6520a63925ac57ba57..b81213b74293d45d75ad45fcad12ca401672b82c 100644 --- a/test/built-ins/Function/15.3.5.4_2-64gs.js +++ b/test/built-ins/Function/15.3.5.4_2-64gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(globalObject)) -negative: TypeError flags: [noStrict] includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return gNonStrict();}; -f.apply(fnGlobalObject()); +assert.throws(TypeError, function() { + f.apply(fnGlobalObject()); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-65gs.js b/test/built-ins/Function/15.3.5.4_2-65gs.js index bcd94c7464fc2d1c30cad7f11cc7e916f848794d..54c22f32b735c30f6257b1b429a39873c2187940 100644 --- a/test/built-ins/Function/15.3.5.4_2-65gs.js +++ b/test/built-ins/Function/15.3.5.4_2-65gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call()) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.call(); +assert.throws(TypeError, function() { + f.call(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-66gs.js b/test/built-ins/Function/15.3.5.4_2-66gs.js index 5a4949c65757c5514d75bcb4dd61a3d9dec89940..d1040ee9f7ecbb89cdf9eff8133fa030817e692f 100644 --- a/test/built-ins/Function/15.3.5.4_2-66gs.js +++ b/test/built-ins/Function/15.3.5.4_2-66gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(null)) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.call(null); +assert.throws(TypeError, function() { + f.call(null); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-67gs.js b/test/built-ins/Function/15.3.5.4_2-67gs.js index b822d4efa04cf2043a56ea0546c61cbaa565e3b6..7bc91bb5b5b72b93639971e6c867920263decbc9 100644 --- a/test/built-ins/Function/15.3.5.4_2-67gs.js +++ b/test/built-ins/Function/15.3.5.4_2-67gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(undefined)) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.call(undefined); +assert.throws(TypeError, function() { + f.call(undefined); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-68gs.js b/test/built-ins/Function/15.3.5.4_2-68gs.js index ecd41764233b936e68a03098504c7a2ee68e01a4..4b89bb0fe891d096bd77fff977b85849f244246e 100644 --- a/test/built-ins/Function/15.3.5.4_2-68gs.js +++ b/test/built-ins/Function/15.3.5.4_2-68gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(someObject)) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; var o = {}; -f.call(o); +assert.throws(TypeError, function() { + f.call(o); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-69gs.js b/test/built-ins/Function/15.3.5.4_2-69gs.js index 508c9e29470c0d27fdcbd9985facd13fb9e80839..019902fd11816aab76ee3c5da09c357dc1cb6504 100644 --- a/test/built-ins/Function/15.3.5.4_2-69gs.js +++ b/test/built-ins/Function/15.3.5.4_2-69gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(globalObject)) -negative: TypeError flags: [noStrict] includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return gNonStrict();}; -f.call(fnGlobalObject()); +assert.throws(TypeError, function() { + f.call(fnGlobalObject()); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-6gs.js b/test/built-ins/Function/15.3.5.4_2-6gs.js index 85f528ba35717d17b675b5faea9fbcb682bc09f7..6850219ef728d536d897778fd76a663b9c2b0f35 100644 --- a/test/built-ins/Function/15.3.5.4_2-6gs.js +++ b/test/built-ins/Function/15.3.5.4_2-6gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ -(function () { - "use strict"; - return gNonStrict(); -})(); +assert.throws(TypeError, function() { + (function () { + "use strict"; + return gNonStrict(); + })(); +}); function gNonStrict() { diff --git a/test/built-ins/Function/15.3.5.4_2-70gs.js b/test/built-ins/Function/15.3.5.4_2-70gs.js index 9812eb537cdb0ef286cd0322c85913e87ca04730..f9a52698d9ef10118325e58211040ba57d098750 100644 --- a/test/built-ins/Function/15.3.5.4_2-70gs.js +++ b/test/built-ins/Function/15.3.5.4_2-70gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind()()) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.bind()(); +assert.throws(TypeError, function() { + f.bind()(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-71gs.js b/test/built-ins/Function/15.3.5.4_2-71gs.js index fa35d6343334a82ce8a52f468aa63f8a4d58eab9..ca5999938ef9f1876ed81101b4f1a12eb7e056ab 100644 --- a/test/built-ins/Function/15.3.5.4_2-71gs.js +++ b/test/built-ins/Function/15.3.5.4_2-71gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(null)()) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.bind(null)(); +assert.throws(TypeError, function() { + f.bind(null)(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-72gs.js b/test/built-ins/Function/15.3.5.4_2-72gs.js index a8ff4c733fd4d91ed5c3af3e58c77307ab50bb23..e2c797dc732d0f0cb7370bf068a01c6d23d785e9 100644 --- a/test/built-ins/Function/15.3.5.4_2-72gs.js +++ b/test/built-ins/Function/15.3.5.4_2-72gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(undefined)()) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; -f.bind(undefined)(); +assert.throws(TypeError, function() { + f.bind(undefined)(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-73gs.js b/test/built-ins/Function/15.3.5.4_2-73gs.js index 050f105e80feabaa2b4900e3fee78aa0995c6849..2f6d746fb898f63dfadfdb491a71fa1fe432eba1 100644 --- a/test/built-ins/Function/15.3.5.4_2-73gs.js +++ b/test/built-ins/Function/15.3.5.4_2-73gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(someObject)()) -negative: TypeError flags: [noStrict] ---*/ function f() { "use strict"; return gNonStrict();}; var o = {}; -f.bind(o)(); +assert.throws(TypeError, function() { + f.bind(o)(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-74gs.js b/test/built-ins/Function/15.3.5.4_2-74gs.js index 0c51e6e8bdde11fd889bb04a6bfddf7ae0c69b44..0daccc033ac1530bed5903e4c1397e4a14a06dec 100644 --- a/test/built-ins/Function/15.3.5.4_2-74gs.js +++ b/test/built-ins/Function/15.3.5.4_2-74gs.js @@ -10,14 +10,15 @@ description: > Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(globalObject)()) -negative: TypeError flags: [noStrict] includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return gNonStrict();}; -f.bind(fnGlobalObject())(); +assert.throws(TypeError, function() { + f.bind(fnGlobalObject())(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-7gs.js b/test/built-ins/Function/15.3.5.4_2-7gs.js index 8cdef3f347d1357fac9e58d1cb306fc5d90b0ce0..d406ab5c202121143db00e4bf19736d32c917d7a 100644 --- a/test/built-ins/Function/15.3.5.4_2-7gs.js +++ b/test/built-ins/Function/15.3.5.4_2-7gs.js @@ -9,13 +9,14 @@ es5id: 15.3.5.4_2-7gs description: > Strict mode - checking access to non-strict function caller from strict function (Function constructor defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var f = Function("return gNonStrict();"); -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/15.3.5.4_2-8gs.js b/test/built-ins/Function/15.3.5.4_2-8gs.js index 5b4048602c5e8bcd01fffab617c9e262422c1c29..9d4dc9e83594aaa75acf2080774cd3c4fa01e559 100644 --- a/test/built-ins/Function/15.3.5.4_2-8gs.js +++ b/test/built-ins/Function/15.3.5.4_2-8gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to strict function caller from non-strict function (Function constructor includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ var f = Function("\"use strict\";\nreturn gNonStrict();"); -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller || gNonStrict.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-94gs.js b/test/built-ins/Function/15.3.5.4_2-94gs.js index 87fa7dda6ce79c5a2eaca8bd74a4231edd021ee3..e22101896ffce5058bb97c641190c87f623b6e59 100644 --- a/test/built-ins/Function/15.3.5.4_2-94gs.js +++ b/test/built-ins/Function/15.3.5.4_2-94gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict function expression (FunctionDeclaration includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -22,4 +21,7 @@ function f() { "use strict"; return gNonStrict(); } -f(); + +assert.throws(TypeError, function() { + f(); +}); diff --git a/test/built-ins/Function/15.3.5.4_2-95gs.js b/test/built-ins/Function/15.3.5.4_2-95gs.js index 86765e2a818fc9ac16e690696d10da658b208cbd..b50bacb6cb63aa2254f7a9d76c100ec66681148e 100644 --- a/test/built-ins/Function/15.3.5.4_2-95gs.js +++ b/test/built-ins/Function/15.3.5.4_2-95gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict, constructor-based function (FunctionDeclaration includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -20,4 +19,7 @@ function f() { "use strict"; return gNonStrict(); } -f(); + +assert.throws(TypeError, function() { + f(); +}); diff --git a/test/built-ins/Function/15.3.5.4_2-96gs.js b/test/built-ins/Function/15.3.5.4_2-96gs.js index aa8f24ba697edc94be44265bae4ff2bf38faffa1..abb96b79fe8be5e6ad0771b9df519fb5db44214e 100644 --- a/test/built-ins/Function/15.3.5.4_2-96gs.js +++ b/test/built-ins/Function/15.3.5.4_2-96gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from non-strict property (FunctionDeclaration includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -26,4 +25,7 @@ function f() { "use strict"; return o.gNonStrict; } -f(); + +assert.throws(TypeError, function() { + f(); +}); diff --git a/test/built-ins/Function/15.3.5.4_2-97gs.js b/test/built-ins/Function/15.3.5.4_2-97gs.js index 75548534a2a8cf245afdf254d222741e003d6b5b..d1a138a71d75c3173aa374abaa9a16f36cec74ab 100644 --- a/test/built-ins/Function/15.3.5.4_2-97gs.js +++ b/test/built-ins/Function/15.3.5.4_2-97gs.js @@ -10,7 +10,6 @@ description: > Strict mode - checking access to strict function caller from bound non-strict function (FunctionDeclaration includes strict directive prologue) -negative: TypeError flags: [noStrict] ---*/ @@ -20,8 +19,10 @@ function f() { "use strict"; return gNonStrict(); } -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrictBindee() { return gNonStrictBindee.caller || gNonStrictBindee.caller.throwTypeError; diff --git a/test/built-ins/Function/15.3.5.4_2-9gs.js b/test/built-ins/Function/15.3.5.4_2-9gs.js index 72b86357f75c00cdc5f48a9925fefafbfb3eef5a..9ed1212bed7c87f9eb0250e2a12d6a36f0adccf2 100644 --- a/test/built-ins/Function/15.3.5.4_2-9gs.js +++ b/test/built-ins/Function/15.3.5.4_2-9gs.js @@ -10,13 +10,14 @@ description: > Strict mode - checking access to non-strict function caller from strict function (New'ed Function constructor defined within strict mode) -negative: TypeError flags: [onlyStrict] ---*/ var f = new Function("return gNonStrict();"); -f(); +assert.throws(TypeError, function() { + f(); +}); function gNonStrict() { return gNonStrict.caller; diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A13.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A13.js index dec7ed6a84c38cf239caead73963cbfae5576dee..348c650fda6fc03ee0a431a842b80c1c3472ae8a 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A13.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A13.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.3_A13 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.apply.call(undefined, {}, []); +assert.throws(TypeError, function() { + Function.prototype.apply.call(undefined, {}, []); +}); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A14.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A14.js index a9a78a79b43ed3e5dc3dd4d2adcb1a437610cad5..dc8bb33ff50d81c5e0a3cdac51aed1e0a959f989 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A14.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A14.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.3_A14 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.apply.call(null, {}, []); +assert.throws(TypeError, function() { + Function.prototype.apply.call(null, {}, []); +}); diff --git a/test/built-ins/Function/prototype/apply/S15.3.4.3_A15.js b/test/built-ins/Function/prototype/apply/S15.3.4.3_A15.js index e3f9442cabf79812f967cb7df20e60ffc2a095c4..c2ff028f75bec72704bdfeac9338317691fb02f9 100644 --- a/test/built-ins/Function/prototype/apply/S15.3.4.3_A15.js +++ b/test/built-ins/Function/prototype/apply/S15.3.4.3_A15.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.3_A15 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.apply.call({}, {}, []); +assert.throws(TypeError, function() { + Function.prototype.apply.call({}, {}, []); +}); diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A1.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A1.js index 25939c1221ae7b054c9348dffc5801e4767a5bfe..02d66d06dd59881436decfadf04bb426cafaedca 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A1.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A1.js @@ -5,10 +5,12 @@ info: "\"caller\" of bound function is poisoned (step 20)" es5id: 15.3.4.5_A1 description: A bound function should fail to find its "caller" -negative: TypeError ---*/ function foo() { return bar.caller; } var bar = foo.bind({}); function baz() { return bar(); } -baz(); + +assert.throws(TypeError, function() { + baz(); +}); diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A13.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A13.js index 0e5a864860fa6745c1a30f4217cf3bc26b1e99d0..abb29703585dba7bad832e83502593d66b36f119 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A13.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A13.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.5_A13 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.bind.call(undefined, {}); +assert.throws(TypeError, function() { + Function.prototype.bind.call(undefined, {}); +}); diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A14.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A14.js index df2211364c0b412182336df8e18e1a33e71fbde6..f72ee04c526c4b2924c41dceccb4f45541640051 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A14.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A14.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.5_A14 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.bind.call(null, {}); +assert.throws(TypeError, function() { + Function.prototype.bind.call(null, {}); +}); diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A15.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A15.js index 4154448c9e6233031033627b441f83ddb6a257f2..45f816e3395992593fcc4ad550981ac89bcf7966 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A15.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A15.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.5_A15 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.bind.call({}, {}); +assert.throws(TypeError, function() { + Function.prototype.bind.call({}, {}); +}); diff --git a/test/built-ins/Function/prototype/bind/S15.3.4.5_A2.js b/test/built-ins/Function/prototype/bind/S15.3.4.5_A2.js index 76339dabb1e4865c0f846e818a53f73017d6b7e7..25ef64935aef8e8b1e5afb7dd4db66b0cb4a7025 100644 --- a/test/built-ins/Function/prototype/bind/S15.3.4.5_A2.js +++ b/test/built-ins/Function/prototype/bind/S15.3.4.5_A2.js @@ -5,10 +5,12 @@ info: "\"arguments\" of bound function is poisoned (step 21)" es5id: 15.3.4.5_A2 description: a bound function should fail to find the bound function "arguments" -negative: TypeError ---*/ function foo() { return bar.arguments; } var bar = foo.bind({}); function baz() { return bar(); } -baz(); + +assert.throws(TypeError, function() { + baz(); +}); diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A13.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A13.js index 9dcc96f0f663e08da57c47b61a1cb299c9e3d947..c3ca80a810940ace142896a94d87bda61de56aab 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A13.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A13.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.4_A13 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.call.call(undefined, {}); +assert.throws(TypeError, function() { + Function.prototype.call.call(undefined, {}); +}); diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A14.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A14.js index f02e8438e9432abaee705e8e5f8da37cf2b9f882..9635387890c4d97f0f14c69c149a8cd97af93055 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A14.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A14.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.4_A14 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.call.call(null, {}); +assert.throws(TypeError, function() { + Function.prototype.call.call(null, {}); +}); diff --git a/test/built-ins/Function/prototype/call/S15.3.4.4_A15.js b/test/built-ins/Function/prototype/call/S15.3.4.4_A15.js index a3823f7abc69d4ce7bad6b702c20c0009922024a..c975ccbfdf34f78efea63c480dac6b4cd54e4b7c 100644 --- a/test/built-ins/Function/prototype/call/S15.3.4.4_A15.js +++ b/test/built-ins/Function/prototype/call/S15.3.4.4_A15.js @@ -4,7 +4,8 @@ /*--- es5id: 15.3.4.4_A15 description: If IsCallable(func) is false, then throw a TypeError exception. -negative: TypeError ---*/ -Function.prototype.call.call({}, {}); +assert.throws(TypeError, function() { + Function.prototype.call.call({}, {}); +}); diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A12.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A12.js index b477b441ebb5bc35a8459c01b96c6ef15ee3f925..16ae665b0a624a4bf4bed2d6994cf62413423408 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A12.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A12.js @@ -6,7 +6,8 @@ es5id: 15.3.4.2_A12 description: > The Function.prototype.toString function is not generic; it throws a TypeError exception if its this value is not a Function object. -negative: TypeError ---*/ -Function.prototype.toString.call(undefined); +assert.throws(TypeError, function() { + Function.prototype.toString.call(undefined); +}); diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A13.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A13.js index b45110ce957db2c3a3bcaa888d95cf41a6694620..3eea9c60e491b83ed990c27555e05621a704bc38 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A13.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A13.js @@ -6,7 +6,8 @@ es5id: 15.3.4.2_A13 description: > The toString function is not generic; it throws a TypeError exception if its this value is not a Function object. -negative: TypeError ---*/ -Function.prototype.toString.call(null); +assert.throws(TypeError, function() { + Function.prototype.toString.call(null); +}); diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A14.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A14.js index 09e247a14b5583d30b6b790c054adcee6a4d8fb7..52367b6accaf8e6ffffddf10e8d9b9a606df94c8 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A14.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A14.js @@ -6,7 +6,8 @@ es5id: 15.3.4.2_A14 description: > The toString function is not generic; it throws a TypeError exception if its this value is not a Function object. -negative: TypeError ---*/ -Function.prototype.toString.call({}); +assert.throws(TypeError, function() { + Function.prototype.toString.call({}); +}); diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A15.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A15.js index 3ade4c19880064def4046caa3df546a7d0fe3bce..f6d41b1baee6e8baf9c4761ce83f01bd4e665c2f 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A15.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A15.js @@ -9,7 +9,8 @@ es5id: 15.3.4.2_A15 description: > Whether or not they are callable, RegExp objects are not Function objects, so toString should throw a TypeError. -negative: TypeError ---*/ -Function.prototype.toString.call(/x/); +assert.throws(TypeError, function() { + Function.prototype.toString.call(/x/); +}); diff --git a/test/built-ins/Function/prototype/toString/S15.3.4.2_A16.js b/test/built-ins/Function/prototype/toString/S15.3.4.2_A16.js index 83da50d87aca0594e5a3fd0dc66b836f29900198..f9032dd9000c121b5cf5d8f13b588de66ba4e717 100644 --- a/test/built-ins/Function/prototype/toString/S15.3.4.2_A16.js +++ b/test/built-ins/Function/prototype/toString/S15.3.4.2_A16.js @@ -10,9 +10,10 @@ description: > The String constructor, given an object, should invoke that object's toString method as a method, i.e., with its this value bound to that object. -negative: TypeError ---*/ var obj = {toString: Function.prototype.toString}; -String(obj); +assert.throws(TypeError, function() { + String(obj); +}); diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A12.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A12.js index 6a97daba709480622e93008f775dae71154c75fc..6b8c1bd5792ec4b6d04ade8ef64ea896102e9135 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A12.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A12.js @@ -6,7 +6,8 @@ es5id: 15.2.4.5_A12 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.hasOwnProperty.call(undefined, 'foo'); +assert.throws(TypeError, function() { + Object.prototype.hasOwnProperty.call(undefined, 'foo'); +}); diff --git a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A13.js b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A13.js index ea6df998e499f0b3b051090d37799eee2992d53b..e1dd5a7b02f82415fd0d7db17c9290940541b796 100644 --- a/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A13.js +++ b/test/built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A13.js @@ -6,7 +6,8 @@ es5id: 15.2.4.5_A13 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.hasOwnProperty.call(null, 'foo'); +assert.throws(TypeError, function() { + Object.prototype.hasOwnProperty.call(null, 'foo'); +}); diff --git a/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A12.js b/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A12.js index 8ca37a1aa8b086330e7bd66fda44fe2f4672ec2e..49afa59a15875953372024dd9e5bfd40e78a788f 100644 --- a/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A12.js +++ b/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A12.js @@ -6,7 +6,8 @@ es5id: 15.2.4.6_A12 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.isPrototypeOf.call(undefined, {}); +assert.throws(TypeError, function() { + Object.prototype.isPrototypeOf.call(undefined, {}); +}); diff --git a/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A13.js b/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A13.js index 720b469bef17edf3d17c993a733a68be174fefe9..ebe5259a855c39488de53e254235440ddfcbd9c2 100644 --- a/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A13.js +++ b/test/built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A13.js @@ -6,7 +6,8 @@ es5id: 15.2.4.6_A13 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.isPrototypeOf.call(null, {}); +assert.throws(TypeError, function() { + Object.prototype.isPrototypeOf.call(null, {}); +}); diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A12.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A12.js index 7f109a78fc3bd28d3512b6ebcd21afefd0b8333d..880b6efa6640095283e0dbb581f867ee9d200b1f 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A12.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A12.js @@ -6,7 +6,8 @@ es5id: 15.2.4.7_A12 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.propertyIsEnumerable.call(undefined, 'foo'); +assert.throws(TypeError, function() { + Object.prototype.propertyIsEnumerable.call(undefined, 'foo'); +}); diff --git a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A13.js b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A13.js index e5df558b53a8f9855da001c28ed65e9e45d2092e..ec8f38591bce344339f2f0874c1da2473602735a 100644 --- a/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A13.js +++ b/test/built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A13.js @@ -6,7 +6,8 @@ es5id: 15.2.4.7_A13 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.propertyIsEnumerable.call(null, 'foo'); +assert.throws(TypeError, function() { + Object.prototype.propertyIsEnumerable.call(null, 'foo'); +}); diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A12.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A12.js index f49b906bed978e4cf06f3a15d741c2bd0e54a91f..a24064372edab67b605ca452133659bab7bc9f03 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A12.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A12.js @@ -6,7 +6,8 @@ es5id: 15.2.4.3_A12 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.toLocaleString.call(undefined); +assert.throws(TypeError, function() { + Object.prototype.toLocaleString.call(undefined); +}); diff --git a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A13.js b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A13.js index 682fa9994e08468ea1052882109932b7ea9381a1..5a097f22e820cb0b013ff5ef86bebd87ae2b5887 100644 --- a/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A13.js +++ b/test/built-ins/Object/prototype/toLocaleString/S15.2.4.3_A13.js @@ -6,7 +6,8 @@ es5id: 15.2.4.3_A13 description: > Let O be the result of calling ToObject passing the this value as the argument. -negative: TypeError ---*/ -Object.prototype.toLocaleString.call(null); +assert.throws(TypeError, function() { + Object.prototype.toLocaleString.call(null); +}); diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A12.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A12.js index 24b24f66ee7e6fc14072f6fe528edfe8da8e67f3..47b9528737f9d0e6a619ed6e11f3f8ef38847523 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A12.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A12.js @@ -7,7 +7,8 @@ info: > argument. es5id: 15.2.4.4_A12 description: Checking Object.prototype.valueOf invoked by the 'call' property. -negative: TypeError ---*/ -Object.prototype.valueOf.call(undefined); +assert.throws(TypeError, function() { + Object.prototype.valueOf.call(undefined); +}); diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js index 05e6972092dfa8dac1dc0f4cd7b6b1e3ad05c1a4..117318711997492420aa8a52605c9b1699e3e185 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js @@ -7,7 +7,8 @@ info: > argument. es5id: 15.2.4.4_A13 description: Checking Object.prototype.valueOf invoked by the 'call' property. -negative: TypeError ---*/ -Object.prototype.valueOf.call(null); +assert.throws(TypeError, function() { + Object.prototype.valueOf.call(null); +}); diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A14.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A14.js index cdb953f084d1f4e2004ce4fc81bb77c0070d4ee9..6234d8a2193d4bf8fee5e2a8d41bd9a85bc97c08 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A14.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A14.js @@ -7,7 +7,8 @@ info: > argument. es5id: 15.2.4.4_A14 description: Checking Object.prototype.valueOf invoked by the 'call' property. -negative: TypeError ---*/ -(1,Object.prototype.valueOf)(); +assert.throws(TypeError, function() { + (1,Object.prototype.valueOf)(); +}); diff --git a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A15.js b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A15.js index 148e06fc4bea3608b2352e0ccdd1968499591795..0d2e19f1f7c70286a86812077ffcaf9e82d96625 100644 --- a/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A15.js +++ b/test/built-ins/Object/prototype/valueOf/S15.2.4.4_A15.js @@ -7,8 +7,10 @@ info: > argument. es5id: 15.2.4.4_A15 description: Checking Object.prototype.valueOf when called as a global function. -negative: TypeError ---*/ var v = Object.prototype.valueOf; -v(); + +assert.throws(TypeError, function() { + v(); +}); diff --git a/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js b/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js index 5d9752218e8d60eea56025d594d9d2c314f21504..b7192f34623969c3612d74f4c4acab985ea0d3f6 100644 --- a/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js +++ b/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js @@ -7,7 +7,8 @@ info: > es6id: S25.4.3.1_A2.1_T1 author: Sam Mikes description: Promise.call("non-object") throws TypeError -negative: TypeError ---*/ -Promise.call("non-object", function () {}); +assert.throws(TypeError, function() { + Promise.call("non-object", function () {}); +}); diff --git a/test/built-ins/Promise/S25.4.3.1_A3.1_T1.js b/test/built-ins/Promise/S25.4.3.1_A3.1_T1.js index 86094968ad45afc72075a7c53b6807cb4ec41cf2..f57420e88420ea16127ba36d559a7aab6e2a4abc 100644 --- a/test/built-ins/Promise/S25.4.3.1_A3.1_T1.js +++ b/test/built-ins/Promise/S25.4.3.1_A3.1_T1.js @@ -7,7 +7,8 @@ info: > es6id: S25.4.3.1_A3.1_T1 author: Sam Mikes description: new Promise("not callable") throws TypeError -negative: TypeError ---*/ -new Promise("not callable"); +assert.throws(TypeError, function() { + new Promise("not callable"); +}); diff --git a/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js index 35d10770b4a85703729f9ed604a63b453691f998..5b5851e05a3701cb1a75c974c9c03806902df850 100644 --- a/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js +++ b/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js @@ -5,7 +5,6 @@ info: > Promise.all should throw if 'this' does not conform to Promise constructor es6id: S25.4.4.1_A4.1_T1 -negative: TypeError description: this must conform to Promise constructor in Promise.all author: Sam Mikes ---*/ @@ -13,4 +12,6 @@ author: Sam Mikes function ZeroArgConstructor() { } -Promise.all.call(ZeroArgConstructor, []); +assert.throws(TypeError, function() { + Promise.all.call(ZeroArgConstructor, []); +}); diff --git a/test/built-ins/Promise/prototype/S25.4.5_A1.1_T1.js b/test/built-ins/Promise/prototype/S25.4.5_A1.1_T1.js index 3cb592216ccdd4c016be2523de1762d57a02466d..8acb63022aa3482962909e3c3d130fe6d9323878 100644 --- a/test/built-ins/Promise/prototype/S25.4.5_A1.1_T1.js +++ b/test/built-ins/Promise/prototype/S25.4.5_A1.1_T1.js @@ -7,7 +7,8 @@ info: > es6id: S25.4.5_A1.1_T1 author: Sam Mikes description: Promise prototype does not have [[PromiseState]] internal slot -negative: TypeError ---*/ -Promise.call(Promise.prototype, function () {}); +assert.throws(TypeError, function() { + Promise.call(Promise.prototype, function () {}); +}); diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js index 5bb18fe796c1ed28be162747a8a863e4f9a0888b..94fd05bbeb162655ab9cb3ddace4c6df8429dccc 100644 --- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js +++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js @@ -7,10 +7,10 @@ info: > es6id: S25.4.5.3_A2.1_T1 author: Sam Mikes description: Promise.prototype.then throw if 'this' is non-Object -negative: TypeError ---*/ var p = new Promise(function () {}); -p.then.call(3, function () {}, function () {}); - +assert.throws(TypeError, function() { + p.then.call(3, function () {}, function () {}); +}); diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js index 085f9a8cff1981c59f29667bdaeafbcdd15d2f9a..63a2c7503315e0d957179ad6544e087ee9f294c9 100644 --- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js +++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js @@ -7,7 +7,6 @@ info: > es6id: S25.4.5.3_A2.1_T2 author: Sam Mikes description: Promise.prototype.then throw if 'this' is non-Promise Object -negative: TypeError ---*/ function ZeroArgConstructor() { @@ -15,4 +14,6 @@ function ZeroArgConstructor() { var z = new ZeroArgConstructor(); -Promise.then.call(z, function () {}, function () {}); +assert.throws(TypeError, function() { + Promise.then.call(z, function () {}, function () {}); +}); diff --git a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js index 0c62768bc85f81bbda697fb8c1b9b9a76e846677..fcf6ba1933dc77c7b5d80bc68b7d9a60f0268840 100644 --- a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js +++ b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js @@ -9,10 +9,11 @@ info: > es6id: S25.4.4.3_A3.1_T1 author: Sam Mikes description: Promise.race throws if 'this' does not conform to Promise constructor -negative: TypeError ---*/ function ZeroArgConstructor() { } -Promise.race.call(ZeroArgConstructor, [3]); +assert.throws(TypeError, function() { + Promise.race.call(ZeroArgConstructor, [3]); +}); diff --git a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js index a889a4571078df68457ead08c40e55a0c370db65..56c322f9b420f576a9dac210ac5bcabb30c0b5d8 100644 --- a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js +++ b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js @@ -9,9 +9,10 @@ info: > es6id: S25.4.4.3_A3.1_T2 author: Sam Mikes description: Promise.race throws TypeError, even on empty array, when 'this' does not conform to Promise constructor -negative: TypeError ---*/ function BadPromiseConstructor(f) { f(undefined, undefined); } -Promise.race.call(BadPromiseConstructor, []); +assert.throws(TypeError, function() { + Promise.race.call(BadPromiseConstructor, []); +}); diff --git a/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js b/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js index 443d5c1b297fba83958cbf8b1ca190757091ca7e..d7eb078c95482f5f401b1c6e8e3e77a90d457232 100644 --- a/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js +++ b/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js @@ -7,10 +7,11 @@ info: > es6id: S25.4.4.4_A3.1_T1 author: Sam Mikes description: Promise.reject throws TypeError for bad 'this' -negative: TypeError ---*/ function ZeroArgConstructor() { } -Promise.reject.call(ZeroArgConstructor, 4); +assert.throws(TypeError, function() { + Promise.reject.call(ZeroArgConstructor, 4); +}); diff --git a/test/built-ins/global/S15.1_A1_T1.js b/test/built-ins/global/S15.1_A1_T1.js index fc285a2fec44845d9017f53fe332bf7822c2628d..18d89f5b49b6f19f0314ab58f262ce4030fe7810 100644 --- a/test/built-ins/global/S15.1_A1_T1.js +++ b/test/built-ins/global/S15.1_A1_T1.js @@ -7,7 +7,10 @@ es5id: 15.1_A1_T1 description: > It is not possible to use the global object as a constructor with the new operator -negative: TypeError ---*/ -new this; +var global = this; + +assert.throws(TypeError, function() { + new global; +}); diff --git a/test/built-ins/global/S15.1_A1_T2.js b/test/built-ins/global/S15.1_A1_T2.js index e2bab6d97f4de80b378fe7a7b51e3092da727147..796612aca00ef51377853608168471211896c1f0 100644 --- a/test/built-ins/global/S15.1_A1_T2.js +++ b/test/built-ins/global/S15.1_A1_T2.js @@ -7,7 +7,10 @@ es5id: 15.1_A1_T2 description: > It is not possible to use the global object as a constructor with the new operator -negative: TypeError ---*/ -new this(); +var global = this; + +assert.throws(TypeError, function() { + new global(); +}); diff --git a/test/built-ins/global/S15.1_A2_T1.js b/test/built-ins/global/S15.1_A2_T1.js index 018ba752fc42080aa92676b48f8180d75b0dd6f1..e2a730aaaf0c43ca52675b543be856762e6431aa 100644 --- a/test/built-ins/global/S15.1_A2_T1.js +++ b/test/built-ins/global/S15.1_A2_T1.js @@ -5,7 +5,10 @@ info: The global object does not have a [[Call]] property es5id: 15.1_A2_T1 description: It is not possible to invoke the global object as a function -negative: TypeError ---*/ -this(); +var global = this; + +assert.throws(TypeError, function() { + global(); +}); diff --git a/test/language/arguments-object/10.6-2gs.js b/test/language/arguments-object/10.6-2gs.js index 2262ebdf7a8b971c14c3809dcd2b22b5bde2091e..577a92d4c97f74949b2f93d2ec6aca189212715e 100644 --- a/test/language/arguments-object/10.6-2gs.js +++ b/test/language/arguments-object/10.6-2gs.js @@ -9,11 +9,13 @@ es5id: 10.6-2gs description: > Strict Mode - arguments.callee cannot be accessed in a strict function -negative: . flags: [onlyStrict] ---*/ function f_10_6_1_gs(){ return arguments.callee; } -f_10_6_1_gs(); + +assert.throws(TypeError, function() { + f_10_6_1_gs(); +}); diff --git a/test/language/asi/S7.9_A5.7_T1.js b/test/language/asi/S7.9_A5.7_T1.js index d61fc10158ff2d8b60b50b147fd43f2193ee8cbd..feee880ad340a35cd2c9b7f352e73de6ea128388 100644 --- a/test/language/asi/S7.9_A5.7_T1.js +++ b/test/language/asi/S7.9_A5.7_T1.js @@ -12,12 +12,14 @@ info: > es5id: 7.9_A5.7_T1 description: Try use Variable1 \n ++ \n ++ \n Variable2 construction -negative: ReferenceError ---*/ var x=0, y=0; + +assert.throws(ReferenceError, function() { var z= x ++ ++ y +}); diff --git a/test/language/asi/S7.9_A7_T7.js b/test/language/asi/S7.9_A7_T7.js index bc570566f2cd2f00a4949f002895ad8d16a9ef92..f7d01e25393cd1f889225f11a9b5c9d32c73da0d 100644 --- a/test/language/asi/S7.9_A7_T7.js +++ b/test/language/asi/S7.9_A7_T7.js @@ -5,9 +5,9 @@ info: Check Var Statement for automatic semicolon insertion es5id: 7.9_A7_T7 description: Checking if execution of "var x \n y" passes -negative: ReferenceError ---*/ -//CHECK#1 +assert.throws(ReferenceError, function() { var x y +}); diff --git a/test/language/eval-code/10.4.2.1-1gs.js b/test/language/eval-code/10.4.2.1-1gs.js index de201f63b2bd7e9702833cf31e4d85e97d45bb94..8aeb23fce55759fc2573900d396cb182ce0da06a 100644 --- a/test/language/eval-code/10.4.2.1-1gs.js +++ b/test/language/eval-code/10.4.2.1-1gs.js @@ -10,10 +10,10 @@ description: > Strict Mode - eval code cannot instantiate variable in the variable environment of the calling context that invoked the eval if the code of the calling context is strict code -negative: ReferenceError flags: [onlyStrict] ---*/ eval("var x = 7;"); -x = 9; -throw NotEarlyError; +assert.throws(ReferenceError, function() { + x = 9; +}); diff --git a/test/language/expressions/assignment/11.13.1-4-28gs.js b/test/language/expressions/assignment/11.13.1-4-28gs.js index bb06297c16f6606feda074ee597a90b5651db133..a373fc076f97ea9ed43aaa50fc4b86cbc72c0ccb 100644 --- a/test/language/expressions/assignment/11.13.1-4-28gs.js +++ b/test/language/expressions/assignment/11.13.1-4-28gs.js @@ -9,8 +9,9 @@ es5id: 11.13.1-4-28gs description: > Strict Mode - TypeError is thrown if the identifier 'Math.PI' appears as the LeftHandSideExpression of simple assignment(=) -negative: TypeError flags: [onlyStrict] ---*/ -Math.PI = 20; +assert.throws(TypeError, function() { + Math.PI = 20; +}); diff --git a/test/language/expressions/assignment/11.13.1-4-29gs.js b/test/language/expressions/assignment/11.13.1-4-29gs.js index bd9dc61eff96c09d7ce6c9eb77a03a5ddd1d5ca9..f0b9cc177a53563366128c01c7031f7d3e398cb2 100644 --- a/test/language/expressions/assignment/11.13.1-4-29gs.js +++ b/test/language/expressions/assignment/11.13.1-4-29gs.js @@ -9,8 +9,9 @@ es5id: 11.13.1-4-29gs description: > Strict Mode - SyntaxError is thrown if the identifier 'Math.PI' appears as the LeftHandSideExpression of simple assignment(=) -negative: . flags: [onlyStrict] ---*/ -Math.PI = 20; +assert.throws(TypeError, function() { + Math.PI = 20; +}); diff --git a/test/language/expressions/void/S11.4.2_A2_T2.js b/test/language/expressions/void/S11.4.2_A2_T2.js index a43f99ca7896650c8ccc19d1fa3eccb43012f03c..89b3de6d922d492995883c9b3bddddaeb50222c3 100644 --- a/test/language/expressions/void/S11.4.2_A2_T2.js +++ b/test/language/expressions/void/S11.4.2_A2_T2.js @@ -5,8 +5,8 @@ info: Operator "void" uses GetValue es5id: 11.4.2_A2_T2 description: If GetBase(x) is null, throw ReferenceError -negative: ReferenceError ---*/ -//CHECK#1 -void x; +assert.throws(ReferenceError, function() { + void x; +}); diff --git a/test/language/line-terminators/S7.3_A3.1_T1.js b/test/language/line-terminators/S7.3_A3.1_T1.js index fa3ef486f88772bf6b8eb1bc53f71bdc1a9dfd11..45ca9558f53a9f6b3b50d9359557e0cde3fa4285 100644 --- a/test/language/line-terminators/S7.3_A3.1_T1.js +++ b/test/language/line-terminators/S7.3_A3.1_T1.js @@ -2,11 +2,11 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Single line comments can not contain LINE FEED (U+000A) inside +info: Single line comments are terminated by the LINE FEED (U+000A) character es5id: 7.3_A3.1_T1 description: Insert LINE FEED (\u000A) into single line comment -negative: ReferenceError ---*/ -// CHECK#1 -eval("// single line \u000A comment"); +assert.throws(Test262Error, function() { + eval("// single line \u000A throw new Test262Error();"); +}); diff --git a/test/language/line-terminators/S7.3_A3.2_T1.js b/test/language/line-terminators/S7.3_A3.2_T1.js index 11f0b00956f3553ba631d1a5cb7abc95832b11a5..eb4fbb79e0029d130d5613a59974e8e8b8aaa7ac 100644 --- a/test/language/line-terminators/S7.3_A3.2_T1.js +++ b/test/language/line-terminators/S7.3_A3.2_T1.js @@ -5,8 +5,7 @@ info: Single line comments can not contain CARRIAGE RETURN (U+000D) inside es5id: 7.3_A3.2_T1 description: Insert CARRIAGE RETURN (\u000D) into single line comment -negative: ReferenceError +negative: SyntaxError ---*/ -// CHECK#1 -eval("// single line \u000D comment"); +// single line comment ??? (invalid) diff --git a/test/language/line-terminators/S7.3_A3.3_T1.js b/test/language/line-terminators/S7.3_A3.3_T1.js index 26076de50783fc7ead78c12de50f0bc144f23e18..6a8bd1b8d85b1204be5f1524c01e06fb45835396 100644 --- a/test/language/line-terminators/S7.3_A3.3_T1.js +++ b/test/language/line-terminators/S7.3_A3.3_T1.js @@ -2,11 +2,12 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -info: Single line comments can not contain LINE SEPARATOR (U+2028) inside +info: > + Single line comments are terminated by the LINE SEPARATOR (U+2028) + character es5id: 7.3_A3.3_T1 description: Insert LINE SEPARATOR (\u2028) into single line comment -negative: ReferenceError +negative: SyntaxError ---*/ -// CHECK#1 -eval("// single line \u2028 comment"); +// single line LS>
??? (invalid) diff --git a/test/language/line-terminators/S7.3_A3.4_T1.js b/test/language/line-terminators/S7.3_A3.4_T1.js index d7d7b1b929c99d9e64a39b92c74196819cd1f6ef..b1e07af9f267d844155550b8987ac90e66e8a4ad 100644 --- a/test/language/line-terminators/S7.3_A3.4_T1.js +++ b/test/language/line-terminators/S7.3_A3.4_T1.js @@ -5,8 +5,7 @@ info: Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside es5id: 7.3_A3.4_T1 description: Insert PARAGRAPH SEPARATOR (\u2029) into single line comment -negative: ReferenceError +negative: SyntaxError ---*/ -// CHECK#1 -eval("// single line \u2029 comment"); +// single line PS>
??? (invalid) diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T1.js b/test/language/literals/numeric/S7.8.3_A4.1_T1.js index e1db008cb1f428baaa67d5befeb7d6daf67c5fdc..bc06c1d1ba298abd7386f757fb25bf0a3e1e0e20 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T1.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T1.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T1 description: "ExponentPart :: e DecimalDigits" -negative: ReferenceError ---*/ -//CHECK#1 -e1 +assert.throws(ReferenceError, function() { + e1 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T2.js b/test/language/literals/numeric/S7.8.3_A4.1_T2.js index 5e65f18eac4b3fe7f785a2ace74c77db5c31f040..7f380c77cb80f094b37d2782ef50ca051a31d28c 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T2.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T2.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T2 description: "ExponentPart :: E DecimalDigits" -negative: ReferenceError ---*/ -//CHECK#1 -E1 +assert.throws(ReferenceError, function() { + E1 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T3.js b/test/language/literals/numeric/S7.8.3_A4.1_T3.js index c9c9a631bdb804f7714e64b668b950480865dfb5..d409549e6fc938b7d1da49a2b586593c954692ea 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T3.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T3.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T3 description: "ExponentPart :: e DecimalDigits" -negative: ReferenceError ---*/ -//CHECK#1 -e-1 +assert.throws(ReferenceError, function() { + e-1 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T4.js b/test/language/literals/numeric/S7.8.3_A4.1_T4.js index c99ba6d18c7966e82a792c425c62603420789b9a..bc52c52480f23dc517a1680e571b0fade7aeb432 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T4.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T4.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T4 description: "ExponentPart :: E DecimalDigits" -negative: ReferenceError ---*/ -//CHECK#1 -E-1 +assert.throws(ReferenceError, function() { + E-1 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T5.js b/test/language/literals/numeric/S7.8.3_A4.1_T5.js index 3b26c5b4f0a8019f6b3bf6bc62f34c9e91441a8a..b27832b8307aa21eaeb7e45aff21369cd0065100 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T5.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T5.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T5 description: "ExponentPart :: e DecimalDigits" -negative: ReferenceError ---*/ -//CHECK#1 -e+1 +assert.throws(ReferenceError, function() { + e+1 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T6.js b/test/language/literals/numeric/S7.8.3_A4.1_T6.js index c3cf5e7cc07422b4f2218bd12ef52abd56b71659..0ec20924b340482c7b9c03d90c931fa2886da230 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T6.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T6.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T6 description: "ExponentPart :: E DecimalDigits" -negative: ReferenceError ---*/ -//CHECK#1 -E+1 +assert.throws(ReferenceError, function() { + E+1 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T7.js b/test/language/literals/numeric/S7.8.3_A4.1_T7.js index 5ae2cf0ace0e5cec4e1867746d602311a142739e..38e2db4d032252758713dc6fc3e2fb6463579e0b 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T7.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T7.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T7 description: "ExponentPart :: e 0" -negative: ReferenceError ---*/ -//CHECK#1 -e0 +assert.throws(ReferenceError, function() { + e0 +}); diff --git a/test/language/literals/numeric/S7.8.3_A4.1_T8.js b/test/language/literals/numeric/S7.8.3_A4.1_T8.js index 9adcd083761a18068e533e80f7a258c26b61f645..c90de605753e12615381bdd54225470e55b509cc 100644 --- a/test/language/literals/numeric/S7.8.3_A4.1_T8.js +++ b/test/language/literals/numeric/S7.8.3_A4.1_T8.js @@ -5,8 +5,8 @@ info: "DecimalLiteral :: ExponentPart is incorrect" es5id: 7.8.3_A4.1_T8 description: "ExponentPart :: E 0" -negative: ReferenceError ---*/ -//CHECK#1 -E0 +assert.throws(ReferenceError, function() { + E0 +}); diff --git a/test/language/object-literal/not-defined.js b/test/language/object-literal/not-defined.js index 4a426efbb62c03fbaddef44f3e7005b1f7dbf03b..892d86ff4bb25d780f40b707fc8831ff031d0291 100644 --- a/test/language/object-literal/not-defined.js +++ b/test/language/object-literal/not-defined.js @@ -4,6 +4,8 @@ es6id: 12.2.5 description: > Throws when IdentifierReference is undefined -negative: ReferenceError ---*/ -var o = {notDefined}; + +assert.throws(ReferenceError, function() { + var o = {notDefined}; +}); diff --git a/test/language/statements/class/name-binding/in-extends-expression-assigned.js b/test/language/statements/class/name-binding/in-extends-expression-assigned.js index f4a1ffb551ad4ef7d0479728de7c797e2cf3d750..2c6a5f244bf5d3c380c2ca583639559cad10ef8d 100644 --- a/test/language/statements/class/name-binding/in-extends-expression-assigned.js +++ b/test/language/statements/class/name-binding/in-extends-expression-assigned.js @@ -4,6 +4,7 @@ es6id: 14.5 description: > class name binding in extends expression, assigned -negative: ReferenceError ---*/ -var x = (class x extends x {}); +assert.throws(ReferenceError, function() { + var x = (class x extends x {}); +}); diff --git a/test/language/statements/class/name-binding/in-extends-expression-grouped.js b/test/language/statements/class/name-binding/in-extends-expression-grouped.js index f885f5d46ea163ba995535621eb06a82332579b5..1fab25593c766938a966dcb722c34279aeea4fbe 100644 --- a/test/language/statements/class/name-binding/in-extends-expression-grouped.js +++ b/test/language/statements/class/name-binding/in-extends-expression-grouped.js @@ -4,6 +4,8 @@ es6id: 14.5 description: > class name binding in extends expression, grouped -negative: ReferenceError ---*/ -(class x extends x {}); + +assert.throws(ReferenceError, function() { + (class x extends x {}); +}); diff --git a/test/language/statements/class/name-binding/in-extends-expression.js b/test/language/statements/class/name-binding/in-extends-expression.js index 14cc0ae00f7af43d971cdf4039f489a61df1cbd3..75d3f67ded318cd9a3993941cb831495a8f780d9 100644 --- a/test/language/statements/class/name-binding/in-extends-expression.js +++ b/test/language/statements/class/name-binding/in-extends-expression.js @@ -4,6 +4,7 @@ es6id: 14.5 description: > class name binding in extends expression -negative: ReferenceError ---*/ -class x extends x {} +assert.throws(ReferenceError, function() { + class x extends x {} +}); diff --git a/test/language/statements/const/block-local-closure-get-before-initialization.js b/test/language/statements/const/block-local-closure-get-before-initialization.js index 1d653600c474e1121e1dfe418bb5860743ec6173..ca98d6538c8980018afff8582532872f28820ad0 100644 --- a/test/language/statements/const/block-local-closure-get-before-initialization.js +++ b/test/language/statements/const/block-local-closure-get-before-initialization.js @@ -9,7 +9,11 @@ negative: ReferenceError ---*/ { function f() { return x + 1; } - f(); + + assert.throws(ReferenceError, function() { + f(); + }); + const x = 1; } diff --git a/test/language/statements/const/block-local-use-before-initialization-in-declaration-statement.js b/test/language/statements/const/block-local-use-before-initialization-in-declaration-statement.js index ad02f327426b84f967c9f8e41bd68c939dbb6a4a..a051be25fa1ab0bf351903df0dc16f9ff7ff03e0 100644 --- a/test/language/statements/const/block-local-use-before-initialization-in-declaration-statement.js +++ b/test/language/statements/const/block-local-use-before-initialization-in-declaration-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > const: block local use before initialization in declaration statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -{ - const x = x + 1; -} +assert.throws(ReferenceError, function() { + { + const x = x + 1; + } +}); diff --git a/test/language/statements/const/block-local-use-before-initialization-in-prior-statement.js b/test/language/statements/const/block-local-use-before-initialization-in-prior-statement.js index f2f1ad2cbf6949572e13f1b7142d6318ffa43000..e3390ad441833bf3d7f9aedc6af4d71162c2fa1b 100644 --- a/test/language/statements/const/block-local-use-before-initialization-in-prior-statement.js +++ b/test/language/statements/const/block-local-use-before-initialization-in-prior-statement.js @@ -5,8 +5,10 @@ es6id: 13.1 description: > const: block local use before initialization in prior statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -{ - x; const x = 1; -} + +assert.throws(ReferenceError, function() { + { + x; const x = 1; + } +}); diff --git a/test/language/statements/const/function-local-closure-get-before-initialization.js b/test/language/statements/const/function-local-closure-get-before-initialization.js index 7dcff9c414fb103fd504029978c258e515dcc036..41aaf13795e4dea836116128fc6f1ff234dfb999 100644 --- a/test/language/statements/const/function-local-closure-get-before-initialization.js +++ b/test/language/statements/const/function-local-closure-get-before-initialization.js @@ -5,10 +5,13 @@ es6id: 13.1 description: > const: function local closure [[Get]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ (function() { function f() { return x + 1; } - f(); + + assert.throws(ReferenceError, function() { + f(); + }); + const x = 1; }()); diff --git a/test/language/statements/const/function-local-use-before-initialization-in-declaration-statement.js b/test/language/statements/const/function-local-use-before-initialization-in-declaration-statement.js index 8130fd75657d1c99c8de7a22f9192ad6ad54330c..3c5ca42c0f9874532ccff05e3d9fbf2610460dd7 100644 --- a/test/language/statements/const/function-local-use-before-initialization-in-declaration-statement.js +++ b/test/language/statements/const/function-local-use-before-initialization-in-declaration-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > const: function local use before initialization in declaration statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -(function() { - const x = x + 1; -}()); +assert.throws(ReferenceError, function() { + (function() { + const x = x + 1; + }()); +}); diff --git a/test/language/statements/const/function-local-use-before-initialization-in-prior-statement.js b/test/language/statements/const/function-local-use-before-initialization-in-prior-statement.js index fff3f2923ec13106326d9a8145061f29b94fb2f2..f35d5b4e5cc5553909c4ee29cf3bb2f714b478de 100644 --- a/test/language/statements/const/function-local-use-before-initialization-in-prior-statement.js +++ b/test/language/statements/const/function-local-use-before-initialization-in-prior-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > const: function local use before initialization in prior statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -(function() { - x; const x = 1; -}()); +assert.throws(ReferenceError, function() { + (function() { + x; const x = 1; + }()); +}); diff --git a/test/language/statements/const/global-closure-get-before-initialization.js b/test/language/statements/const/global-closure-get-before-initialization.js index 8d791be055c31b74709d24b2b2c78c65dba8631e..4d9347d995c67dc210c1dd811a102f741a7a02df 100644 --- a/test/language/statements/const/global-closure-get-before-initialization.js +++ b/test/language/statements/const/global-closure-get-before-initialization.js @@ -5,8 +5,12 @@ es6id: 13.1 description: > const: global closure [[Get]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ + function f() { return x + 1; } -f(); + +assert.throws(ReferenceError, function() { + f(); +}); + const x = 1; diff --git a/test/language/statements/const/syntax/const-invalid-assignment-next-expression-for.js b/test/language/statements/const/syntax/const-invalid-assignment-next-expression-for.js index ab56909403b45ab1d0a86c5a7b5e2642b08ce423..7d0d49ae15461ea542cc55e96ffa191f3e495b09 100644 --- a/test/language/statements/const/syntax/const-invalid-assignment-next-expression-for.js +++ b/test/language/statements/const/syntax/const-invalid-assignment-next-expression-for.js @@ -4,7 +4,8 @@ es6id: 13.6.3.7_S5.a.i description: > const: invalid assignment in next expression -negative: TypeError ---*/ -for (const i = 0; i < 1; i++) {} +assert.throws(TypeError, function() { + for (const i = 0; i < 1; i++) {} +}); diff --git a/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-in.js b/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-in.js index 82a9a69981f8b643b415459adad8f5e6a861f766..ffcea0b6f651263bec4c96d5f8aeeb50df88df46 100644 --- a/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-in.js +++ b/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-in.js @@ -4,7 +4,8 @@ es6id: 13.6.4.10_S1.a.i description: > const: invalid assignment in Statement body -negative: TypeError ---*/ -for (const x in [1, 2, 3]) { x++ } +assert.throws(TypeError, function() { + for (const x in [1, 2, 3]) { x++ } +}); diff --git a/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-of.js b/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-of.js index 824fcc563d4fe7fc80988346bc5dab9888b1533f..e055a0181b7f983778cdcdbea6b0092b28fef08b 100644 --- a/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-of.js +++ b/test/language/statements/const/syntax/const-invalid-assignment-statement-body-for-of.js @@ -4,7 +4,8 @@ es6id: 13.6.4.10_S1.a.i description: > const: invalid assignment in Statement body -negative: TypeError ---*/ -for (const x of [1, 2, 3]) { x++ } +assert.throws(TypeError, function() { + for (const x of [1, 2, 3]) { x++ } +}); diff --git a/test/language/statements/for-in/const-bound-names-fordecl-tdz-for-in.js b/test/language/statements/for-in/const-bound-names-fordecl-tdz-for-in.js index dab2df3be2f526f29903110928329c54a422d30e..53c6dbf9bb6e03d0246cdd092b7b5ed8b361763f 100644 --- a/test/language/statements/for-in/const-bound-names-fordecl-tdz-for-in.js +++ b/test/language/statements/for-in/const-bound-names-fordecl-tdz-for-in.js @@ -4,9 +4,9 @@ es6id: 13.6.4.12_S2 description: > ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of) -negative: ReferenceError ---*/ -let x = 1; -for (const x in { x }) {} - +assert.throws(ReferenceError, function() { + let x = 1; + for (const x in { x }) {} +}); diff --git a/test/language/statements/for-in/let-bound-names-fordecl-tdz-for-in.js b/test/language/statements/for-in/let-bound-names-fordecl-tdz-for-in.js index ed742fb27edf1471513b55b579b42c7df06756e8..a0e50ce4c02a0aef89d8286c37004918cce81585 100644 --- a/test/language/statements/for-in/let-bound-names-fordecl-tdz-for-in.js +++ b/test/language/statements/for-in/let-bound-names-fordecl-tdz-for-in.js @@ -4,9 +4,9 @@ es6id: 13.6.4.12_S2 description: > ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of) -negative: ReferenceError ---*/ -let x = 1; -for (let x in { x }) {} - +assert.throws(ReferenceError, function() { + let x = 1; + for (let x in { x }) {} +}); diff --git a/test/language/statements/for-of/const-bound-names-fordecl-tdz-for-of.js b/test/language/statements/for-of/const-bound-names-fordecl-tdz-for-of.js index 09a1c8755511020e0430a40175489aef2ffc2830..5692340e542f0a1ef166876ddba6f3b220fb3c43 100644 --- a/test/language/statements/for-of/const-bound-names-fordecl-tdz-for-of.js +++ b/test/language/statements/for-of/const-bound-names-fordecl-tdz-for-of.js @@ -4,9 +4,9 @@ es6id: 13.6.4.12_S2 description: > ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of) -negative: ReferenceError ---*/ -let x = 1; -for (const x of [x]) {} - +assert.throws(ReferenceError, function() { + let x = 1; + for (const x of [x]) {} +}); diff --git a/test/language/statements/for-of/let-bound-names-fordecl-tdz-for-of.js b/test/language/statements/for-of/let-bound-names-fordecl-tdz-for-of.js index eaa453c7968e33cd1f5a80270d4ac49bfea466ef..2dabe7c8aa659ba1e883c603435e42ae13c4ef94 100644 --- a/test/language/statements/for-of/let-bound-names-fordecl-tdz-for-of.js +++ b/test/language/statements/for-of/let-bound-names-fordecl-tdz-for-of.js @@ -4,9 +4,9 @@ es6id: 13.6.4.12_S2 description: > ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of) -negative: ReferenceError ---*/ -let x = 1; -for (let x of [x]) {} - +assert.throws(ReferenceError, function() { + let x = 1; + for (let x of [x]) {} +}); diff --git a/test/language/statements/function/13.2-19-b-3gs.js b/test/language/statements/function/13.2-19-b-3gs.js index b72f27e53156001b7b402a12c62f1bbf27220c4f..8877e0675afedc1a790266ab4bb0094c619997b5 100644 --- a/test/language/statements/function/13.2-19-b-3gs.js +++ b/test/language/statements/function/13.2-19-b-3gs.js @@ -9,9 +9,11 @@ es5id: 13.2-19-b-3gs description: > StrictMode - error is thrown when assign a value to the 'caller' property of a function object -negative: TypeError flags: [onlyStrict] ---*/ function _13_2_19_b_3_gs() {} -_13_2_19_b_3_gs.caller = 1; + +assert.throws(TypeError, function() { + _13_2_19_b_3_gs.caller = 1; +}); diff --git a/test/language/statements/let/block-local-closure-get-before-initialization.js b/test/language/statements/let/block-local-closure-get-before-initialization.js index 4b5279a4f3b3341781b7736cbacde4f2399e360a..1555b5f5a5152f26647b5497dc28228d3d4c2f9a 100644 --- a/test/language/statements/let/block-local-closure-get-before-initialization.js +++ b/test/language/statements/let/block-local-closure-get-before-initialization.js @@ -5,10 +5,13 @@ es6id: 13.1 description: > let: block local closure [[Get]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ { function f() { return x + 1; } - f(); + + assert.throws(ReferenceError, function() { + f(); + }); + let x; } diff --git a/test/language/statements/let/block-local-closure-set-before-initialization.js b/test/language/statements/let/block-local-closure-set-before-initialization.js index c09ee73eecd1285f73b256ba16bd3fe52d4dc580..166ad326e107ecca270a428456eac80afe270f24 100644 --- a/test/language/statements/let/block-local-closure-set-before-initialization.js +++ b/test/language/statements/let/block-local-closure-set-before-initialization.js @@ -5,10 +5,13 @@ es6id: 13.1 description: > let: block local closure [[Set]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ { function f() { x = 1; } - f(); + + assert.throws(ReferenceError, function() { + f(); + }); + let x; } diff --git a/test/language/statements/let/block-local-use-before-initialization-in-declaration-statement.js b/test/language/statements/let/block-local-use-before-initialization-in-declaration-statement.js index 13b757a27b60725a054011fdd9da3808b2df29d8..f32a00ddcde71aea863fc455803ebe501ec1c13d 100644 --- a/test/language/statements/let/block-local-use-before-initialization-in-declaration-statement.js +++ b/test/language/statements/let/block-local-use-before-initialization-in-declaration-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > let: block local use before initialization in declaration statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -{ - let x = x + 1; -} +assert.throws(ReferenceError, function() { + { + let x = x + 1; + } +}); diff --git a/test/language/statements/let/block-local-use-before-initialization-in-prior-statement.js b/test/language/statements/let/block-local-use-before-initialization-in-prior-statement.js index 933beede82d9e2a4ef04cecf79e73c0681f56f5c..c259a7e6678c0ebfeefa9a29225ad3babfdbe4d8 100644 --- a/test/language/statements/let/block-local-use-before-initialization-in-prior-statement.js +++ b/test/language/statements/let/block-local-use-before-initialization-in-prior-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > let: block local use before initialization in prior statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -{ - x; let x; -} +assert.throws(ReferenceError, function() { + { + x; let x; + } +}); diff --git a/test/language/statements/let/function-local-closure-get-before-initialization.js b/test/language/statements/let/function-local-closure-get-before-initialization.js index 31d066067a9d355db50226b1e1e3369ebb3fcd2b..2d85affdbc9955d5c59bc5683e7e5fe03e2652c8 100644 --- a/test/language/statements/let/function-local-closure-get-before-initialization.js +++ b/test/language/statements/let/function-local-closure-get-before-initialization.js @@ -5,10 +5,13 @@ es6id: 13.1 description: > let: function local closure [[Get]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ (function() { function f() { return x + 1; } - f(); + + assert.throws(ReferenceError, function() { + f(); + }); + let x; }()); diff --git a/test/language/statements/let/function-local-closure-set-before-initialization.js b/test/language/statements/let/function-local-closure-set-before-initialization.js index 8a9b7b6747ab7cd1f943ab938ed3950c41efcf47..e9c86806c50d65bc555ff68211cb9732979d938d 100644 --- a/test/language/statements/let/function-local-closure-set-before-initialization.js +++ b/test/language/statements/let/function-local-closure-set-before-initialization.js @@ -5,10 +5,13 @@ es6id: 13.1 description: > let: function local closure [[Set]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ (function() { function f() { x = 1; } - f(); + + assert.throws(ReferenceError, function() { + f(); + }); + let x; }()); diff --git a/test/language/statements/let/function-local-use-before-initialization-in-declaration-statement.js b/test/language/statements/let/function-local-use-before-initialization-in-declaration-statement.js index 241c93feac2c48cc42f6524291f13e2edfc7d15e..afe00a43edab222be372b1d3551e0d87b0b96179 100644 --- a/test/language/statements/let/function-local-use-before-initialization-in-declaration-statement.js +++ b/test/language/statements/let/function-local-use-before-initialization-in-declaration-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > let: function local use before initialization in declaration statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -(function() { - let x = x + 1; -}()); +assert.throws(ReferenceError, function() { + (function() { + let x = x + 1; + }()); +}); diff --git a/test/language/statements/let/function-local-use-before-initialization-in-prior-statement.js b/test/language/statements/let/function-local-use-before-initialization-in-prior-statement.js index 33d49cdca63145944a71f75f4905ca6ae069151c..486848a6c78c1d2d70a71e76a67e1112e29247cc 100644 --- a/test/language/statements/let/function-local-use-before-initialization-in-prior-statement.js +++ b/test/language/statements/let/function-local-use-before-initialization-in-prior-statement.js @@ -5,8 +5,9 @@ es6id: 13.1 description: > let: function local use before initialization in prior statement. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ -(function() { - x; let x; -}()); +assert.throws(ReferenceError, function() { + (function() { + x; let x; + }()); +}); diff --git a/test/language/statements/let/global-closure-get-before-initialization.js b/test/language/statements/let/global-closure-get-before-initialization.js index 06a04759b32823577add62876f40b106b2d34427..ea56575513085b512cf1d93d708811ae69683236 100644 --- a/test/language/statements/let/global-closure-get-before-initialization.js +++ b/test/language/statements/let/global-closure-get-before-initialization.js @@ -5,8 +5,11 @@ es6id: 13.1 description: > let: global closure [[Get]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ function f() { return x + 1; } -f(); + +assert.throws(ReferenceError, function() { + f(); +}); + let x; diff --git a/test/language/statements/let/global-closure-set-before-initialization.js b/test/language/statements/let/global-closure-set-before-initialization.js index 9b789205eb32e7f5e7629e8e34f90a01694868c6..04ff7a3e49bb2d95b5c9738a68e5e36b6e611ebf 100644 --- a/test/language/statements/let/global-closure-set-before-initialization.js +++ b/test/language/statements/let/global-closure-set-before-initialization.js @@ -5,8 +5,11 @@ es6id: 13.1 description: > let: global closure [[Set]] before initialization. (TDZ, Temporal Dead Zone) -negative: ReferenceError ---*/ function f() { x = 1; } -f(); + +assert.throws(ReferenceError, function() { + f(); +}); + let x; diff --git a/test/language/statements/throw/S12.13_A1.js b/test/language/statements/throw/S12.13_A1.js index ce48406d25e51e22407d7e9f0fcb78813e168576..f1f4375ae9d7d5be62b343c2cfa9919bdf4c377c 100644 --- a/test/language/statements/throw/S12.13_A1.js +++ b/test/language/statements/throw/S12.13_A1.js @@ -5,7 +5,15 @@ info: Sanity test for throw statement es5id: 12.13_A1 description: Trying to throw exception with "throw" -negative: expected_message ---*/ -throw "expected_message"; +var inCatch = false; + +try { + throw "expected_message"; +} catch (err) { + assert.sameValue(err, "expected_message"); + inCatch = true; +} + +assert.sameValue(inCatch, true); diff --git a/test/language/types/object/S8.6.2_A7.js b/test/language/types/object/S8.6.2_A7.js index a75b9ef0e59a13374042c9a7937d4898325d010c..a32d8a9e7fe1be79fc62c0bb83d8c2abbfe3aeb2 100644 --- a/test/language/types/object/S8.6.2_A7.js +++ b/test/language/types/object/S8.6.2_A7.js @@ -7,11 +7,8 @@ info: > constructors. Math object is NOT constructor es5id: 8.6.2_A7 description: Checking if execution of "var objMath=new Math" passes -negative: TypeError ---*/ -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -var objMath=new Math; - -////////////////////////////////////////////////////////////////////////////// +assert.throws(TypeError, function() { + var objMath=new Math; +}); diff --git a/test/language/types/reference/8.7.2-3-a-1gs.js b/test/language/types/reference/8.7.2-3-a-1gs.js index 59c14445c45f7821920fdce446c617d23f48dc06..06274950d8ac30659743030a326d3294da73565a 100644 --- a/test/language/types/reference/8.7.2-3-a-1gs.js +++ b/test/language/types/reference/8.7.2-3-a-1gs.js @@ -9,8 +9,9 @@ es5id: 8.7.2-3-a-1gs description: > Strict Mode - ReferenceError is thrown if LeftHandSide evaluate to an unresolvable Reference -negative: . flags: [onlyStrict] ---*/ -b = 11; +assert.throws(ReferenceError, function() { + b = 11; +}); diff --git a/test/language/types/reference/8.7.2-3-a-2gs.js b/test/language/types/reference/8.7.2-3-a-2gs.js index a869694302e624eb746e5b4d573077e38438adfc..1a9789c1ff8b8b19793a4673cd7da2df62511dd9 100644 --- a/test/language/types/reference/8.7.2-3-a-2gs.js +++ b/test/language/types/reference/8.7.2-3-a-2gs.js @@ -9,10 +9,11 @@ es5id: 8.7.2-3-a-2gs description: > Strict Mode - 'runtime' error is thrown before LeftHandSide evaluates to an unresolvable Reference -negative: Test262Error flags: [onlyStrict] includes: [Test262Error.js] ---*/ -throw new Test262Error(); -b = 11; +assert.throws(Test262Error, function() { + throw new Test262Error(); + b = 11; +}); diff --git a/test/language/types/string/S8.4_A7.1.js b/test/language/types/string/S8.4_A7.1.js index 5479cf8b336ba93dcbd0f9ea785608919eaee336..d5aa37401af78bf5cd4ed1d23af5ebae30e081bd 100644 --- a/test/language/types/string/S8.4_A7.1.js +++ b/test/language/types/string/S8.4_A7.1.js @@ -5,7 +5,8 @@ info: <LF> between chunks of one string not allowed es5id: 8.4_A7.1 description: Insert <LF> between chunks of one string -negative: ReferenceError ---*/ -eval("var x = asdf\u000Aghjk"); +assert.throws(ReferenceError, function() { + eval("var x = asdf\u000Aghjk"); +}); diff --git a/test/language/types/string/S8.4_A7.2.js b/test/language/types/string/S8.4_A7.2.js index fa50f856933173db056d8b8db1f6f411d7691c0a..037b3ab8762d5fb4f430dce56d4c3c0242fc4315 100644 --- a/test/language/types/string/S8.4_A7.2.js +++ b/test/language/types/string/S8.4_A7.2.js @@ -5,7 +5,8 @@ info: <CR> between chunks of one string not allowed es5id: 8.4_A7.2 description: Insert <CR> between chunks of one string -negative: ReferenceError ---*/ -eval("var x = asdf\u000Dghjk"); +assert.throws(ReferenceError, function() { + eval("var x = asdf\u000Dghjk"); +}); diff --git a/test/language/types/string/S8.4_A7.3.js b/test/language/types/string/S8.4_A7.3.js index 2320a56a3242f22a98e240f724118ce2d220038c..99c5522aa4bbd753a828ed20e845904e50c8463b 100644 --- a/test/language/types/string/S8.4_A7.3.js +++ b/test/language/types/string/S8.4_A7.3.js @@ -5,7 +5,8 @@ info: <PS> between chunks of one string not allowed es5id: 8.4_A7.3 description: Insert <PS> between chunks of one string -negative: ReferenceError ---*/ -eval("var x = asdf\u2028ghjk"); +assert.throws(ReferenceError, function() { + eval("var x = asdf\u2028ghjk"); +}); diff --git a/test/language/types/string/S8.4_A7.4.js b/test/language/types/string/S8.4_A7.4.js index 82c79bb5b539e7b7f49c8bf7791f03a7fc1c4c4d..4dd3ac63a9204782f8fa47cbac8ed9e44a2bb5bd 100644 --- a/test/language/types/string/S8.4_A7.4.js +++ b/test/language/types/string/S8.4_A7.4.js @@ -5,7 +5,8 @@ info: <LS> between chunks of one string not allowed es5id: 8.4_A7.4 description: Insert <LS> between chunks of one string -negative: ReferenceError ---*/ -eval("var x = asdf\u2029ghjk"); +assert.throws(ReferenceError, function() { + eval("var x = asdf\u2029ghjk"); +});