diff --git a/test/language/statements/break/S12.8_A2.js b/test/language/statements/break/S12.8_A2.js index 9c231b2b7ef4ca917dcdad6408d56b9d81a9f954..9c06bdbcf849c305a2616a5597ddbe71b2e84077 100644 --- a/test/language/statements/break/S12.8_A2.js +++ b/test/language/statements/break/S12.8_A2.js @@ -11,11 +11,13 @@ description: > Identifier ---*/ +var result; + ////////////////////////////////////////////////////////////////////////////// //CHECK#1 try{ - eval("FOR1 : for(var i=1;i<2;i++){ LABEL1 : do {var x =1;break\u000AFOR1;var y=2;} while(0);}"); - if (i!==2) { + eval("FOR1 : for(var i=1;i<2;i++){ LABEL1 : do {var x =1;break\u000AFOR1;var y=2;} while(0);} result = i;"); + if (result!==2) { $ERROR('#1: Since LineTerminator(U-000A) between break and Identifier not allowed break evaluates without label'); } } catch(e){ @@ -27,8 +29,8 @@ try{ ////////////////////////////////////////////////////////////////////////////// //CHECK#2 try{ - eval("FOR2 : for(var i=1;i<2;i++){ LABEL2 : do {var x =1;break\u000DFOR2;var y=2;} while(0);}"); - if (i!==2) { + eval("FOR2 : for(var i=1;i<2;i++){ LABEL2 : do {var x =1;break\u000DFOR2;var y=2;} while(0);} result = i;"); + if (result!==2) { $ERROR('#2: Since LineTerminator(U-000D) between break and Identifier not allowed break evaluates without label'); } } catch(e){ @@ -40,8 +42,8 @@ try{ ////////////////////////////////////////////////////////////////////////////// //CHECK#3 try{ - eval("FOR3 : for(var i=1;i<2;i++){ LABEL3 : do {var x =1;break\u2028FOR3;var y=2;} while(0);}"); - if (i!==2) { + eval("FOR3 : for(var i=1;i<2;i++){ LABEL3 : do {var x =1;break\u2028FOR3;var y=2;} while(0);} result = i;"); + if (result!==2) { $ERROR('#3: Since LineTerminator(U-2028) between break and Identifier not allowed break evaluates without label'); } } catch(e){ @@ -53,8 +55,8 @@ try{ ////////////////////////////////////////////////////////////////////////////// //CHECK#4 try{ - eval("FOR4 : for(var i=1;i<2;i++){ LABEL4 : do {var x =1;break\u2029FOR4;var y=2;} while(0);}"); - if (i!==2) { + eval("FOR4 : for(var i=1;i<2;i++){ LABEL4 : do {var x =1;break\u2029FOR4;var y=2;} while(0);} result = i;"); + if (result!==2) { $ERROR('#4: Since LineTerminator(U-2029) between break and Identifier not allowed break evaluates without label'); } } catch(e){ diff --git a/test/language/statements/continue/S12.7_A2.js b/test/language/statements/continue/S12.7_A2.js index 1a4aa7c5fe69599b70720fd664abe1bdaf3cfaf1..73bc2c69610c9407f76fd4351550a65ad9fe4701 100644 --- a/test/language/statements/continue/S12.7_A2.js +++ b/test/language/statements/continue/S12.7_A2.js @@ -11,11 +11,13 @@ description: > and Identifier ---*/ +var result; + ////////////////////////////////////////////////////////////////////////////// //CHECK#1 try{ - eval("FOR1 : for(var i=1;i<2;i++){FOR1NESTED : for(var j=1;j<2;j++) { continue\u000AFOR1; } while(0);}"); - if (j!==2) { + eval("FOR1 : for(var i=1;i<2;i++){FOR1NESTED : for(var j=1;j<2;j++) { continue\u000AFOR1; } while(0);} result = j;"); + if (result!==2) { $ERROR('#1: Since LineTerminator(U-000A) between continue and Identifier not allowed continue evaluates without label'); } } catch(e){ @@ -27,8 +29,8 @@ try{ ////////////////////////////////////////////////////////////////////////////// //CHECK#2 try{ - eval("FOR2 : for(var i=1;i<2;i++){FOR2NESTED : for(var j=1;j<2;j++) { continue\u000DFOR2; } while(0);}"); - if (j!==2) { + eval("FOR2 : for(var i=1;i<2;i++){FOR2NESTED : for(var j=1;j<2;j++) { continue\u000DFOR2; } while(0);} result = j;"); + if (result!==2) { $ERROR('#2: Since LineTerminator(U-000D) between continue and Identifier not allowed continue evaluates without label'); } } catch(e){ @@ -40,8 +42,8 @@ try{ ////////////////////////////////////////////////////////////////////////////// //CHECK#3 try{ - eval("FOR3 : for(var i=1;i<2;i++){FOR3NESTED : for(var j=1;j<2;j++) { continue\u2028FOR3; } while(0);}"); - if (j!==2) { + eval("FOR3 : for(var i=1;i<2;i++){FOR3NESTED : for(var j=1;j<2;j++) { continue\u2028FOR3; } while(0);} result = j;"); + if (result!==2) { $ERROR('#3: Since LineTerminator(U-2028) between continue and Identifier not allowed continue evaluates without label'); } } catch(e){ @@ -53,8 +55,8 @@ try{ ////////////////////////////////////////////////////////////////////////////// //CHECK#4 try{ - eval("FOR4 : for(var i=1;i<2;i++){FOR4NESTED : for(var j=1;j<2;j++) { continue\u2029FOR4; } while(0);}"); - if (j!==2) { + eval("FOR4 : for(var i=1;i<2;i++){FOR4NESTED : for(var j=1;j<2;j++) { continue\u2029FOR4; } while(0);} result = j;"); + if (result!==2) { $ERROR('#4: Since LineTerminator(U-2029) between continue and Identifier not allowed continue evaluates without label'); } } catch(e){ diff --git a/test/language/statements/expression/S12.4_A2_T1.js b/test/language/statements/expression/S12.4_A2_T1.js index e79747d9ced059598e7cd176fd37a0daf2f27e48..f92959601d71c1c73c11d0f537e092c58361169c 100644 --- a/test/language/statements/expression/S12.4_A2_T1.js +++ b/test/language/statements/expression/S12.4_A2_T1.js @@ -11,7 +11,7 @@ es5id: 12.4_A2_T1 description: Checking by using eval "(eval("x+1+x==1"))" ---*/ -var __evaluated; +var x, __evaluated; x=1; diff --git a/test/language/statements/expression/S12.4_A2_T2.js b/test/language/statements/expression/S12.4_A2_T2.js index 50696d237d9c0c471f52728e84834e3898c1b8a8..cca391742f523c9445eb8a9debf83f3a1e7fac68 100644 --- a/test/language/statements/expression/S12.4_A2_T2.js +++ b/test/language/statements/expression/S12.4_A2_T2.js @@ -11,7 +11,7 @@ es5id: 12.4_A2_T2 description: Checking by using eval(eval(x), where x is any string) ---*/ -var __evaluated; +var x, __evaluated; x="5+1|0===0"; diff --git a/test/language/statements/for/S12.6.3_A10.1.js b/test/language/statements/for/S12.6.3_A10.1_T1.js similarity index 99% rename from test/language/statements/for/S12.6.3_A10.1.js rename to test/language/statements/for/S12.6.3_A10.1_T1.js index 8d74ca271bccac15348271459a097e3359f6365f..5cf7aafb0f42e8d2cbe9099364fbd85d534a7475 100644 --- a/test/language/statements/for/S12.6.3_A10.1.js +++ b/test/language/statements/for/S12.6.3_A10.1_T1.js @@ -7,6 +7,7 @@ es5id: 12.6.3_A10.1 description: > Checking if executing nested "var-loops" nine blocks depth is evaluated properly +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/for/S12.6.3_A10.1_T2.js b/test/language/statements/for/S12.6.3_A10.1_T2.js new file mode 100644 index 0000000000000000000000000000000000000000..10dec59efc7e1bc351d5b04742cda832a3958281 --- /dev/null +++ b/test/language/statements/for/S12.6.3_A10.1_T2.js @@ -0,0 +1,113 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Nested "var-loops" nine blocks depth is evaluated properly +es5id: 12.6.3_A10.1 +description: > + Checking if executing nested "var-loops" nine blocks depth is + evaluated properly +---*/ + +var __str, index2, index3, index6; + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +try { + __in__deepest__loop=__in__deepest__loop; +} catch (e) { + $ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +try { + index0=index0; +} catch (e) { + $ERROR('#2: "index0=index0" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +try { + index1=index1; +} catch (e) { + $ERROR('#3: "index1=index1" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#4 +try { + index4=index4; +} catch (e) { + $ERROR('#4: "index4=index4" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#5 +try { + index5=index5; +} catch (e) { + $ERROR('#4: "index5=index5" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#6 +try { + index7=index7; +} catch (e) { + $ERROR('#6: "index7=index7" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +//CHECK#7 +try { + index8=index8; +} catch (e) { + $ERROR('#7: "index8=index8" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +__str=""; + +for( var index0=0; index0<=1; index0++) { + for(var index1=0; index1<=index0; index1++) { + for( index2=0; index2<=index1; index2++) { + for( index3=0; index3<=index2; index3++) { + for(var index4=0; index4<=index3; index4++) { + for(var index5=0; index5<=index4; index5++) { + for( index6=0; index6<=index5; index6++) { + for(var index7=0; index7<=index6; index7++) { + for(var index8=0; index8<=index1; index8++) { + var __in__deepest__loop; + __str+=""+index0+index1+index2+index3+index4+index5+index6+index7+index8+'\n'; + } + } + } + } + } + } + } + } +} + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") { + $ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual: __str ==='+ __str ); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/for/S12.6.3_A10.js b/test/language/statements/for/S12.6.3_A10_T1.js similarity index 99% rename from test/language/statements/for/S12.6.3_A10.js rename to test/language/statements/for/S12.6.3_A10_T1.js index d2c7903dace72afdbdfd6af5852d1035dc17b661..458c360347c8290f846f741d63ac23a7a21860e7 100644 --- a/test/language/statements/for/S12.6.3_A10.js +++ b/test/language/statements/for/S12.6.3_A10_T1.js @@ -7,6 +7,7 @@ es5id: 12.6.3_A10 description: > Checking if executing nested "var-loops" nine blocks depth is evaluated properly +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/for/S12.6.3_A10_T2.js b/test/language/statements/for/S12.6.3_A10_T2.js new file mode 100644 index 0000000000000000000000000000000000000000..6b4743e792cafa46da20d138c4b152a00b6acd22 --- /dev/null +++ b/test/language/statements/for/S12.6.3_A10_T2.js @@ -0,0 +1,53 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Nested "var-loops" nine blocks depth is evaluated properly +es5id: 12.6.3_A10 +description: > + Checking if executing nested "var-loops" nine blocks depth is + evaluated properly +---*/ + +var __str, index0, index1, index2, index3, index4, index5, index6, index7, index8; + +////////////////////////////////////////////////////////////////////////////// +//CHECK# +try { + __in__deepest__loop=__in__deepest__loop; +} catch (e) { + $ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception'); +} +// +////////////////////////////////////////////////////////////////////////////// + +__str=""; + +for( index0=0; index0<=1; index0++) { + for( index1=0; index1<=index0; index1++) { + for( index2=0; index2<=index1; index2++) { + for( index3=0; index3<=index2; index3++) { + for( index4=0; index4<=index3; index4++) { + for( index5=0; index5<=index4; index5++) { + for( index6=0; index6<=index5; index6++) { + for( index7=0; index7<=index6; index7++) { + for( index8=0; index8<=index1; index8++) { + var __in__deepest__loop; + __str+=""+index0+index1+index2+index3+index4+index5+index6+index7+index8+'\n'; + } + } + } + } + } + } + } + } +} + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") { + $ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual: __str ==='+ __str ); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/function/13.1-1-1.js b/test/language/statements/function/13.1-1-1.js index 1b83c23a8520a5d97ead4ab3720d8c2bf4861013..e383345001fc7e48e79ee628694f778954953eda 100644 --- a/test/language/statements/function/13.1-1-1.js +++ b/test/language/statements/function/13.1-1-1.js @@ -10,6 +10,7 @@ description: > Duplicate identifier allowed in non-strict function declaration parameter list includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-1-2.js b/test/language/statements/function/13.1-1-2.js index 9b7ba19eabcf26354162effc1cd90213576a126e..93de15fbec7b2c5c1a39d09816187fd648b60f39 100644 --- a/test/language/statements/function/13.1-1-2.js +++ b/test/language/statements/function/13.1-1-2.js @@ -10,6 +10,7 @@ description: > Duplicate identifier allowed in non-strict function expression parameter list includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-2-1.js b/test/language/statements/function/13.1-2-1.js index 018f0098c83642fbd58c050358b003d869267231..f0e7b84e2a00391c3df2c92fb91b4e0c1a83f318 100644 --- a/test/language/statements/function/13.1-2-1.js +++ b/test/language/statements/function/13.1-2-1.js @@ -10,6 +10,7 @@ description: > eval allowed as formal parameter name of a non-strict function declaration includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-2-2.js b/test/language/statements/function/13.1-2-2.js index b60482d5ed9811568fb0e965dc783a443c5c2f74..a4cc5dc9ab310e206aae72bfed630e56dde7c404 100644 --- a/test/language/statements/function/13.1-2-2.js +++ b/test/language/statements/function/13.1-2-2.js @@ -10,6 +10,7 @@ description: > eval allowed as formal parameter name of a non-strict function expression includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-2-5.js b/test/language/statements/function/13.1-2-5.js index 9b069fbf61d88b246c6ee0ad4ac918b5a6250c29..942cd44e1fff064adf7d8abb78bcf18501ccd6ee 100644 --- a/test/language/statements/function/13.1-2-5.js +++ b/test/language/statements/function/13.1-2-5.js @@ -10,6 +10,7 @@ description: > arguments allowed as formal parameter name of a non-strict function declaration includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-2-6.js b/test/language/statements/function/13.1-2-6.js index 0bfb81b09c1b7659b2a1fb8e21bae6cab24e4bb0..06da7509283f3422e1eb5c9ed5f59df3c16a41c1 100644 --- a/test/language/statements/function/13.1-2-6.js +++ b/test/language/statements/function/13.1-2-6.js @@ -10,6 +10,7 @@ description: > arguments allowed as formal parameter name of a non-strict function expression includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-3-1.js b/test/language/statements/function/13.1-3-1.js index d75777447d50073cadf7c766d4631b9ff661a128..7a6b4bbe27a8c35210cc461781ff0ac03a68c9a6 100644 --- a/test/language/statements/function/13.1-3-1.js +++ b/test/language/statements/function/13.1-3-1.js @@ -10,6 +10,7 @@ description: > eval allowed as function identifier in non-strict function declaration includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-3-2.js b/test/language/statements/function/13.1-3-2.js index 05b07203150162c70846dcefe3a09e11747f7eff..681270f6d8aed94e47191a51ba6f4b5016e80117 100644 --- a/test/language/statements/function/13.1-3-2.js +++ b/test/language/statements/function/13.1-3-2.js @@ -10,6 +10,7 @@ description: > eval allowed as function identifier in non-strict function expression includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-3-7.js b/test/language/statements/function/13.1-3-7.js index 0a059e469295a2d9fa1b55ef5f6a4dff3bc1e23f..07275c58f983820395417079328f4abe3d4fbe10 100644 --- a/test/language/statements/function/13.1-3-7.js +++ b/test/language/statements/function/13.1-3-7.js @@ -10,6 +10,7 @@ description: > arguments allowed as function identifier in non-strict function declaration includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.1-3-8.js b/test/language/statements/function/13.1-3-8.js index 356dbc78ae2dab5393d845cfe1b51e58e7700299..3b95fcc5f96dd9de170dfc585a397dac6e14fa14 100644 --- a/test/language/statements/function/13.1-3-8.js +++ b/test/language/statements/function/13.1-3-8.js @@ -10,6 +10,7 @@ description: > arguments allowed as function identifier in non-strict function expression includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() diff --git a/test/language/statements/function/13.2-15-1.js b/test/language/statements/function/13.2-15-1.js index 0e2952a34e24656d54d04cfda06a630a4f3e241e..0105301bec70d7a52f514656a3e9c5e15d8bb246 100644 --- a/test/language/statements/function/13.2-15-1.js +++ b/test/language/statements/function/13.2-15-1.js @@ -9,30 +9,14 @@ es5id: 13.2-15-1 description: > Function Object has length as its own property and does not invoke the setter defined on Function.prototype.length (Step 15) -includes: [runTestCase.js] +includes: [assert.js, propertyHelper.js] ---*/ -function testcase() { - var fun = function (x, y) { }; +var fun = function (x, y) { }; - var verifyValue = false; - verifyValue = (fun.hasOwnProperty("length") && fun.length === 2); +assert(fun.hasOwnProperty("length")); +assert.sameValue(fun.length, 2); - var verifyWritable = false; - fun.length = 1001; - verifyWritable = (fun.length === 1001); - - var verifyEnumerable = false; - for (var p in fun) { - if (p === "length") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete fun.length; - verifyConfigurable = fun.hasOwnProperty("length"); - - return verifyValue && !verifyWritable && !verifyEnumerable && !verifyConfigurable; - } -runTestCase(testcase); +verifyNotEnumerable(fun, "length"); +verifyNotWritable(fun, "length"); +verifyConfigurable(fun, "length"); diff --git a/test/language/statements/function/13.2-18-1.js b/test/language/statements/function/13.2-18-1.js index 8d7b8af24882ce72dc3bb113bc06455730abea2c..653d4829bb8fd27bf7b6f640ff98da9033461cdc 100644 --- a/test/language/statements/function/13.2-18-1.js +++ b/test/language/statements/function/13.2-18-1.js @@ -10,48 +10,34 @@ description: > Function Object has 'prototype' as its own property, it is not enumerable and does not invoke the setter defined on Function.prototype (Step 18) -includes: [runTestCase.js] +includes: [assert.js, propertyHelper.js] ---*/ -function testcase() { - try { - var getFunc = function () { - return 100; - }; - - var data = "data"; - var setFunc = function (value) { - data = value; - }; - Object.defineProperty(Function.prototype, "prototype", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var fun = function () { }; - - var verifyValue = false; - verifyValue = (fun.prototype !== 100 && fun.prototype.toString() === "[object Object]"); - - var verifyEnumerable = false; - for (var p in fun) { - if (p === "prototype" && fun.hasOwnProperty("prototype")) { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete fun.prototype; - verifyConfigurable = fun.hasOwnProperty("prototype"); - - var verifyWritable = false; - fun.prototype = 12 - verifyWritable = (fun.prototype === 12); - - return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable && data === "data"; - } finally { - delete Function.prototype.prototype; - } - } -runTestCase(testcase); +try { + var getFunc = function () { + return 100; + }; + + var data = "data"; + var setFunc = function (value) { + data = value; + }; + Object.defineProperty(Function.prototype, "prototype", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var fun = function () { }; + + assert.notSameValue(fun.prototype, 100); + assert.sameValue(fun.prototype.toString(), "[object Object]"); + + verifyNotEnumerable(fun, "prototype"); + verifyWritable(fun, "prototype"); + verifyNotConfigurable(fun, "prototype"); + + assert.sameValue(data, "data"); +} finally { + delete Function.prototype.prototype; +} diff --git a/test/language/statements/function/S13.2.1_A6_T1.js b/test/language/statements/function/S13.2.1_A6_T1.js index 1afa26711176fa6a38e1a967e3c0957f6c76741e..6e51aa8fe263f4f414081723dbaba1746d08d5ef 100644 --- a/test/language/statements/function/S13.2.1_A6_T1.js +++ b/test/language/statements/function/S13.2.1_A6_T1.js @@ -5,6 +5,7 @@ info: Primitive types are passed by value es5id: 13.2.1_A6_T1 description: Declaring a function with "function __func(arg1, arg2)" +flags: [noStrict] ---*/ function __func(arg1, arg2){ diff --git a/test/language/statements/function/S13.2.1_A6_T2.js b/test/language/statements/function/S13.2.1_A6_T2.js index a20aa33febfd315d9ffe1a6c86c16341a02e7a3f..78f562d500f04fcf3eb41520d072270c7c85d8f2 100644 --- a/test/language/statements/function/S13.2.1_A6_T2.js +++ b/test/language/statements/function/S13.2.1_A6_T2.js @@ -5,6 +5,7 @@ info: Primitive types are passed by value es5id: 13.2.1_A6_T2 description: Declaring a function with "__func = function(arg1, arg2)" +flags: [noStrict] ---*/ __func = function(arg1, arg2){ diff --git a/test/language/statements/function/S13.2.1_A6_T3.js b/test/language/statements/function/S13.2.1_A6_T3.js new file mode 100755 index 0000000000000000000000000000000000000000..6f7ca5fbc189fbf9ac056bb66ed8e18e178235cf --- /dev/null +++ b/test/language/statements/function/S13.2.1_A6_T3.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Primitive types are passed by value +es5id: 13.2.1_A6_T1 +description: Declaring a function with "function __func(arg1, arg2)" +---*/ + +var __func, y, b; + +function __func(arg1, arg2){ + arg1++; + arg2+="BA"; +}; + +var x=1; +y=2; +var a="AB" +b="SAM"; + +__func(x,a); +__func(y,b); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") { + $ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/function/S13.2.1_A6_T4.js b/test/language/statements/function/S13.2.1_A6_T4.js new file mode 100755 index 0000000000000000000000000000000000000000..e3a6cd749be7cf07a0baff57978e29431ea9baf7 --- /dev/null +++ b/test/language/statements/function/S13.2.1_A6_T4.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Primitive types are passed by value +es5id: 13.2.1_A6_T2 +description: Declaring a function with "__func = function(arg1, arg2)" +---*/ + +var __func, y, b; + +__func = function(arg1, arg2){ + arg1++; + arg2+="BA"; +}; + +var x=1; +y=2; +var a="AB" +b="SAM"; + +__func(x,a); +__func(y,b); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") { + $ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/function/S13.2.1_A7_T3.js b/test/language/statements/function/S13.2.1_A7_T3.js index 7fc0140bff69b3fdcee49bdf0940c1a6a739830b..8b5d1356a84b0b5942ece45a5b9e8b663e10c9c0 100644 --- a/test/language/statements/function/S13.2.1_A7_T3.js +++ b/test/language/statements/function/S13.2.1_A7_T3.js @@ -9,6 +9,7 @@ info: > es5id: 13.2.1_A7_T3 description: Returning number. Declaring a function with "function __func()" includes: [Test262Error.js] +flags: [noStrict] ---*/ function __func(){ diff --git a/test/language/statements/function/S13.2.2_A15_T2.js b/test/language/statements/function/S13.2.2_A15_T2.js index 94c9ad3e02206c19bfd973a61020233bb32f99d9..cf8ac4aa409209e8f414c935b43a79f54359b476 100644 --- a/test/language/statements/function/S13.2.2_A15_T2.js +++ b/test/language/statements/function/S13.2.2_A15_T2.js @@ -11,6 +11,8 @@ description: > declared with "obj = {}" ---*/ +var obj; + var __obj = new __FACTORY(); ////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/function/S13.2.2_A15_T3.js b/test/language/statements/function/S13.2.2_A15_T3.js index f2ef353f4bf6c0293adbe24c6fe0885c2f4bdc53..48af37853b6fb0f9dfa62f5aa394a1da569681ac 100644 --- a/test/language/statements/function/S13.2.2_A15_T3.js +++ b/test/language/statements/function/S13.2.2_A15_T3.js @@ -11,6 +11,8 @@ description: > declared with "var obj = {}" ---*/ +var __FACTORY, __obj; + __FACTORY = function (){ this.prop = 1; var obj = {}; diff --git a/test/language/statements/function/S13.2.2_A15_T4.js b/test/language/statements/function/S13.2.2_A15_T4.js index cba1f2d3dc3c6941697d9742fd154a0222f36afb..761ad82e55f291d1172de0b6b23e458074824112 100644 --- a/test/language/statements/function/S13.2.2_A15_T4.js +++ b/test/language/statements/function/S13.2.2_A15_T4.js @@ -11,6 +11,8 @@ description: > declared with "obj = {}" ---*/ +var __FACTORY, __obj, obj; + __FACTORY = function(){ this.prop = 1; obj = {}; diff --git a/test/language/statements/function/S13.2.2_A17_T2.js b/test/language/statements/function/S13.2.2_A17_T2.js index 950ee3dd839b4cdb3c8ba72b37332c5c94aca024..403014d044f64db127e59ede7ef97a4577f91d44 100644 --- a/test/language/statements/function/S13.2.2_A17_T2.js +++ b/test/language/statements/function/S13.2.2_A17_T2.js @@ -5,6 +5,7 @@ info: FunctionExpression containing "with" statement is admitted es5id: 13.2.2_A17_T2 description: Throwing an exception within "with" statement +flags: [noStrict] ---*/ this.p1="alert"; diff --git a/test/language/statements/function/S13.2.2_A17_T3.js b/test/language/statements/function/S13.2.2_A17_T3.js index 24accb026ce0c78cb41f37cade0db56362fbec02..a1d5c333c828351b58b4187f08c48d9ea9ac0b06 100644 --- a/test/language/statements/function/S13.2.2_A17_T3.js +++ b/test/language/statements/function/S13.2.2_A17_T3.js @@ -9,6 +9,7 @@ description: > var getRight declaration adds variable to function scope but getRight in statement resolves within with(__obj) scope and searchs getRight in __obj first +flags: [noStrict] ---*/ p1="alert"; diff --git a/test/language/statements/function/S13.2.2_A18_T1.js b/test/language/statements/function/S13.2.2_A18_T1.js index 1c7b2f98fd120c0fa007df65edb4a9aebd08c89b..1b2022b84e87fed4f7224bdf5d10be926c985389 100644 --- a/test/language/statements/function/S13.2.2_A18_T1.js +++ b/test/language/statements/function/S13.2.2_A18_T1.js @@ -7,6 +7,7 @@ info: > function is admitted es5id: 13.2.2_A18_T1 description: "Object is declared with \"var __obj={callee:\"a\"}\"" +flags: [noStrict] ---*/ var callee=0, b; diff --git a/test/language/statements/function/S13.2.2_A18_T2.js b/test/language/statements/function/S13.2.2_A18_T2.js index e923408c3cc6a6705a6ed6e78ef142b88ff58281..ea34b4fbb444ce950c41f85d8d6be933cfba1445 100644 --- a/test/language/statements/function/S13.2.2_A18_T2.js +++ b/test/language/statements/function/S13.2.2_A18_T2.js @@ -7,6 +7,7 @@ info: > function is admitted es5id: 13.2.2_A18_T2 description: "Object is declared with \"__obj={callee:\"a\"}\"" +flags: [noStrict] ---*/ this.callee = 0; diff --git a/test/language/statements/function/S13.2.2_A19_T1.js b/test/language/statements/function/S13.2.2_A19_T1.js index 714c0d55e64ed32c17ab59bf1651df2756ae105f..4a7e06babccd0cc19c5de7f9132fb7001a72380f 100644 --- a/test/language/statements/function/S13.2.2_A19_T1.js +++ b/test/language/statements/function/S13.2.2_A19_T1.js @@ -5,6 +5,7 @@ info: Function's scope chain is started when it is declared es5id: 13.2.2_A19_T1 description: Function is declared in the global scope +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T2.js b/test/language/statements/function/S13.2.2_A19_T2.js index 42beeafad2d28489a983d90f0d6c668a321f0fa0..f5ae024751ee8861093054bdd7e1d7ad7268f71f 100644 --- a/test/language/statements/function/S13.2.2_A19_T2.js +++ b/test/language/statements/function/S13.2.2_A19_T2.js @@ -5,6 +5,7 @@ info: Function's scope chain is started when it is declared es5id: 13.2.2_A19_T2 description: Function is declared in the object scope. Using "with" statement +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T3.js b/test/language/statements/function/S13.2.2_A19_T3.js index 1a2c076781df2fc6312850ce6ae10607b04aeebe..baf7e4f311da2bb2ed3ee3caf55850d49594c6f3 100644 --- a/test/language/statements/function/S13.2.2_A19_T3.js +++ b/test/language/statements/function/S13.2.2_A19_T3.js @@ -7,6 +7,7 @@ es5id: 13.2.2_A19_T3 description: > Function is declared in the object scope and then an exception is thrown +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T4.js b/test/language/statements/function/S13.2.2_A19_T4.js index a3020aae54fc15d8341153030bac36aec2352909..edd4dfa34fd450eac6a662472ea50c9e9796493f 100644 --- a/test/language/statements/function/S13.2.2_A19_T4.js +++ b/test/language/statements/function/S13.2.2_A19_T4.js @@ -7,6 +7,7 @@ es5id: 13.2.2_A19_T4 description: > Function is declared in the hierarchical object scope and then an exception is thrown +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T5.js b/test/language/statements/function/S13.2.2_A19_T5.js index 9b275ccdaaa205eb18418cb70bb9cd6150f1d1d8..52b88a1fa60b187593be047b03581267ae5ed19c 100644 --- a/test/language/statements/function/S13.2.2_A19_T5.js +++ b/test/language/statements/function/S13.2.2_A19_T5.js @@ -7,6 +7,7 @@ es5id: 13.2.2_A19_T5 description: > Function is declared in the object scope, then an exception is thrown and the object is deleted +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T6.js b/test/language/statements/function/S13.2.2_A19_T6.js index 99da95ff30048e563b91086ca910d216a6ce8767..90c2f36de8c0cc3ed8d142cbe9c8e6efa7593304 100644 --- a/test/language/statements/function/S13.2.2_A19_T6.js +++ b/test/language/statements/function/S13.2.2_A19_T6.js @@ -7,6 +7,7 @@ es5id: 13.2.2_A19_T6 description: > Function is declared in the "object->do-while" scope, then the object is deleted and another object with the same name is declared +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T7.js b/test/language/statements/function/S13.2.2_A19_T7.js index dbb588905b08b83f466abaed442fa3727d6fc28a..f2b00a9ceaddb5553d66b493d113462be42e780e 100644 --- a/test/language/statements/function/S13.2.2_A19_T7.js +++ b/test/language/statements/function/S13.2.2_A19_T7.js @@ -5,6 +5,7 @@ info: Function's scope chain is started when it is declared es5id: 13.2.2_A19_T7 description: Function is declared in the object scope as a variable +flags: [noStrict] ---*/ var a = 1; diff --git a/test/language/statements/function/S13.2.2_A19_T8.js b/test/language/statements/function/S13.2.2_A19_T8.js index 32ff0251a7ffecd6c6293b97d860df7860a5bacf..feeee3f0f54799551f5cc73c1f710832fbb9f3f4 100644 --- a/test/language/statements/function/S13.2.2_A19_T8.js +++ b/test/language/statements/function/S13.2.2_A19_T8.js @@ -5,6 +5,7 @@ info: Function's scope chain is started when it is declared es5id: 13.2.2_A19_T8 description: Function is declared multiply times +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/function/S13.2.2_A1_T1.js b/test/language/statements/function/S13.2.2_A1_T1.js index 4abaf96d2776160b33f8ad7825d83bbcc9de08b1..aef9ccf7cb54ec1c42ee63e9b4e12963b4568ff6 100644 --- a/test/language/statements/function/S13.2.2_A1_T1.js +++ b/test/language/statements/function/S13.2.2_A1_T1.js @@ -21,7 +21,7 @@ catch(e){ $ERROR('#0: __PROTO.type=__MONSTER does not lead to throwing exception') } -function __FACTORY(){this.name=__PREDATOR}; +function __FACTORY(){}; __FACTORY.prototype=__PROTO; diff --git a/test/language/statements/function/S13.2.2_A1_T2.js b/test/language/statements/function/S13.2.2_A1_T2.js index 32c124b4d9e22a57d108e5d3b494be8aacf50292..b0cc1ebf0c6854236fc57c6c2ed287e82cf7a0fb 100644 --- a/test/language/statements/function/S13.2.2_A1_T2.js +++ b/test/language/statements/function/S13.2.2_A1_T2.js @@ -22,7 +22,7 @@ catch(e){ $FAIL('#0: __PROTO.type=__MONSTER does not lead to throwing exception') } -var __FACTORY = function(){this.name=__PREDATOR}; +var __FACTORY = function(){}; __FACTORY.prototype=__PROTO; diff --git a/test/language/statements/function/S13.2.2_A2.js b/test/language/statements/function/S13.2.2_A2.js index ac9d419f15fe82c79841313fc473ef9e045f278e..b004dfebf4646a07523996699e572ec4a6fe5373 100644 --- a/test/language/statements/function/S13.2.2_A2.js +++ b/test/language/statements/function/S13.2.2_A2.js @@ -21,7 +21,7 @@ catch(e){ $ERROR('#0: __PROTO.type=__PLANT does not lead to throwing exception') } -function __FACTORY(){this.name=__ROSE}; +function __FACTORY(){}; __FACTORY.prototype=__PROTO; diff --git a/test/language/statements/function/S13.2.2_A4_T2.js b/test/language/statements/function/S13.2.2_A4_T2.js index 678c08b0eb24f1e2c082ed0ed15a4f75e5bc2099..661364523fc94a0798e262a2686cb7acd828082d 100644 --- a/test/language/statements/function/S13.2.2_A4_T2.js +++ b/test/language/statements/function/S13.2.2_A4_T2.js @@ -12,6 +12,8 @@ es5id: 13.2.2_A4_T2 description: Declaring a function with "__FACTORY = function()" ---*/ +var __CUBE, __FACTORY, __device; + __CUBE="cube"; __FACTORY = function(){}; diff --git a/test/language/statements/function/S13.2.2_A5_T1.js b/test/language/statements/function/S13.2.2_A5_T1.js index 5899ec92be89d1ae850391c574c4069657e9f40e..4e8c8cf00c5ef8e0c4ad7def5c393f300f8173d0 100644 --- a/test/language/statements/function/S13.2.2_A5_T1.js +++ b/test/language/statements/function/S13.2.2_A5_T1.js @@ -11,6 +11,8 @@ es5id: 13.2.2_A5_T1 description: Declaring a function with "function __FACTORY(arg1, arg2)" ---*/ +var __VOLUME, __RED, __ID, __TOP, __BOTTOM, __LEFT, color, top, left, __device; + __VOLUME=8; __RED="red"; __ID=12342; diff --git a/test/language/statements/function/S13.2.2_A5_T2.js b/test/language/statements/function/S13.2.2_A5_T2.js index c73bab462bd1eed3e79892fb649d882a207ae005..8636c8e16b328743b5062b7600a00a16cca19fd8 100644 --- a/test/language/statements/function/S13.2.2_A5_T2.js +++ b/test/language/statements/function/S13.2.2_A5_T2.js @@ -11,6 +11,8 @@ es5id: 13.2.2_A5_T2 description: Declaring a function with "__FACTORY = function(arg1, arg2)" ---*/ +var __VOLUME, __RED, __ID, __TOP, __BOTTOM, __LEFT, __FACTORY, color, top, left, __device; + __VOLUME=8; __RED="red"; __ID=12342; diff --git a/test/language/statements/function/S13.2.2_A6_T1.js b/test/language/statements/function/S13.2.2_A6_T1.js index 128a071f1e82f98e729895e1d62530c5b77e13ca..8cf1b704cd7965f9afa29b43112d3ccb42d14f4c 100644 --- a/test/language/statements/function/S13.2.2_A6_T1.js +++ b/test/language/statements/function/S13.2.2_A6_T1.js @@ -12,6 +12,8 @@ es5id: 13.2.2_A6_T1 description: Declaring a function with "__func = function(arg)" ---*/ +var __FOO, __BAR, __func, __obj; + __FOO="fooValue"; __BAR="barValue"; diff --git a/test/language/statements/function/S13.2.2_A7_T2.js b/test/language/statements/function/S13.2.2_A7_T2.js index 80774ed54a102a59935351df8ae6880f4b6934ad..30ecf2a2c0704fb977f4978716cb1a5213801de6 100644 --- a/test/language/statements/function/S13.2.2_A7_T2.js +++ b/test/language/statements/function/S13.2.2_A7_T2.js @@ -12,6 +12,8 @@ es5id: 13.2.2_A7_T2 description: Declaring a "function as function __func (arg)" ---*/ +var __FRST, __SCND, __func, __obj__; + __FRST="one"; __SCND="two"; diff --git a/test/language/statements/function/S13_A11_T1.js b/test/language/statements/function/S13_A11_T1.js index 8f60d3a26aa5a631140fd86698794aba8bd98f06..1f61478f42de7357b49c8778e0a1ab2dd86d2597 100644 --- a/test/language/statements/function/S13_A11_T1.js +++ b/test/language/statements/function/S13_A11_T1.js @@ -7,6 +7,7 @@ info: > can be deleted es5id: 13_A11_T1 description: Returning result of "delete arguments" +flags: [noStrict] ---*/ function __func(){ return delete arguments;} diff --git a/test/language/statements/function/S13_A11_T2.js b/test/language/statements/function/S13_A11_T2.js index 430413931a4736d687b120c43c3ca39cb8ffcc4b..d98c18017e46aa6a5080a5491ca28bbc88cf9615 100644 --- a/test/language/statements/function/S13_A11_T2.js +++ b/test/language/statements/function/S13_A11_T2.js @@ -9,6 +9,7 @@ es5id: 13_A11_T2 description: > Checking if deleting the arguments property fails and then returning it +flags: [noStrict] ---*/ function __func(){ diff --git a/test/language/statements/function/S13_A12_T1.js b/test/language/statements/function/S13_A12_T1.js index 5d927f44f6a6334606c4030d663c22889a654a6b..b665fe9df7fe051ff6eafea64c4d04c31f598ba7 100644 --- a/test/language/statements/function/S13_A12_T1.js +++ b/test/language/statements/function/S13_A12_T1.js @@ -7,6 +7,7 @@ es5id: 13_A12_T1 description: > Checking if deleting a function that is declared in global scope fails +flags: [noStrict] ---*/ ALIVE="Letov is alive" diff --git a/test/language/statements/function/S13_A12_T2.js b/test/language/statements/function/S13_A12_T2.js index 24f83d0c3cc1528beec2e1cc5b592cf8234a5467..46f81baae113b83774b0582b58b56bb206502553 100644 --- a/test/language/statements/function/S13_A12_T2.js +++ b/test/language/statements/function/S13_A12_T2.js @@ -7,6 +7,7 @@ es5id: 13_A12_T2 description: > Checking if deleting a function that is declared in function scope fails +flags: [noStrict] ---*/ ALIVE="Letov is alive" diff --git a/test/language/statements/function/S13_A14.js b/test/language/statements/function/S13_A14_T1.js similarity index 97% rename from test/language/statements/function/S13_A14.js rename to test/language/statements/function/S13_A14_T1.js index b323b1bce8307d5290dcdda4e75dc66a1a08d69e..605177624270654de95cd7fa97def368d96293b2 100644 --- a/test/language/statements/function/S13_A14.js +++ b/test/language/statements/function/S13_A14_T1.js @@ -5,6 +5,7 @@ info: Unicode symbols in function name are allowed es5id: 13_A14 description: Defining function name with unicode symbols +flags: [noStrict] ---*/ eval("function __func\u0041(__arg){return __arg;};"); diff --git a/test/language/statements/function/S13_A14_T2.js b/test/language/statements/function/S13_A14_T2.js new file mode 100755 index 0000000000000000000000000000000000000000..f28b51c5f80f4ba98fcd3bf23500e8357f483de7 --- /dev/null +++ b/test/language/statements/function/S13_A14_T2.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Unicode symbols in function name are allowed +es5id: 13_A14 +description: Defining function name with unicode symbols +---*/ + +var funcA = eval("function __func\u0041(__arg){return __arg;}; __funcA"); + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (typeof funcA !== "function") { + $ERROR('#1: unicode symbols in function name are allowed'); +} +// +////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/function/S13_A15_T1.js b/test/language/statements/function/S13_A15_T1.js index 725567570363c557250e91a89608cdbd0e41f223..8a4286423e55211a97000ace38e2432c813455d0 100644 --- a/test/language/statements/function/S13_A15_T1.js +++ b/test/language/statements/function/S13_A15_T1.js @@ -5,6 +5,7 @@ info: "''arguments'' variable overrides ActivationObject.arguments" es5id: 13_A15_T1 description: Declaring a function with "__func(arguments)" +flags: [noStrict] ---*/ function __func(arguments){ diff --git a/test/language/statements/function/S13_A15_T2.js b/test/language/statements/function/S13_A15_T2.js index f3bf4276ec8fc8bdc4682640700d39d19cc226d0..241ee049c613d8ebf399bb846438b53ff2af9cfe 100644 --- a/test/language/statements/function/S13_A15_T2.js +++ b/test/language/statements/function/S13_A15_T2.js @@ -5,6 +5,7 @@ info: "''arguments'' variable overrides ActivationObject.arguments" es5id: 13_A15_T2 description: Overriding arguments within functions body +flags: [noStrict] ---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; diff --git a/test/language/statements/function/S13_A15_T3.js b/test/language/statements/function/S13_A15_T3.js index 2931c034dc8fb2e5215f60e0f7f3bda9821c1629..f4f741928a268628de23d7ec40caca0925f83c9e 100644 --- a/test/language/statements/function/S13_A15_T3.js +++ b/test/language/statements/function/S13_A15_T3.js @@ -5,6 +5,7 @@ info: "''arguments'' variable overrides ActivationObject.arguments" es5id: 13_A15_T3 description: Declaring a variable named with "arguments" without a function +flags: [noStrict] ---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; diff --git a/test/language/statements/function/S13_A15_T4.js b/test/language/statements/function/S13_A15_T4.js index 72acf77b127f8361f1b4a7ca296fdb3eb587b182..9f8524db53d93c59788c18dc6ddab64d170718d5 100644 --- a/test/language/statements/function/S13_A15_T4.js +++ b/test/language/statements/function/S13_A15_T4.js @@ -7,6 +7,7 @@ es5id: 13_A15_T4 description: > Declaring a variable named with "arguments" and following a "return" statement within a function body +flags: [noStrict] ---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; diff --git a/test/language/statements/function/S13_A15_T5.js b/test/language/statements/function/S13_A15_T5.js index 5e2cf9e66118b8c5e7c67df854bff2246d1bc2db..9563b78390b14acd8a840b8b865253cce6ca1b94 100644 --- a/test/language/statements/function/S13_A15_T5.js +++ b/test/language/statements/function/S13_A15_T5.js @@ -5,6 +5,7 @@ info: "''arguments'' variable overrides ActivationObject.arguments" es5id: 13_A15_T5 description: Creating a variable named with "arguments" without a function +flags: [noStrict] ---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; diff --git a/test/language/statements/function/S13_A16.js b/test/language/statements/function/S13_A16_T1.js similarity index 97% rename from test/language/statements/function/S13_A16.js rename to test/language/statements/function/S13_A16_T1.js index 6d2bdbea980b57d5626498cd815d523159ab68b5..11dba26c68b7e8965216c5acc8c4c952c0e8c37e 100644 --- a/test/language/statements/function/S13_A16.js +++ b/test/language/statements/function/S13_A16_T1.js @@ -5,6 +5,7 @@ info: Any separators are admitted between declaration chunks es5id: 13_A16 description: Inserting separators between declaration chunks +flags: [noStrict] ---*/ function diff --git a/test/language/statements/function/S13_A16_T2.js b/test/language/statements/function/S13_A16_T2.js new file mode 100755 index 0000000000000000000000000000000000000000..00fbf5995e4578e4ac0584345615e5cc25b131ff --- /dev/null +++ b/test/language/statements/function/S13_A16_T2.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Any separators are admitted between declaration chunks +es5id: 13_A16 +description: Inserting separators between declaration chunks +---*/ + +function +x +( +) +{ +} +; + +x(); + +function y ( ) {}; + +y(); + +function + +z + +( + +) + +{ + +} + +; + +z(); + +eval("function\u0009\u2029w(\u000C)\u00A0{\u000D}; w()"); diff --git a/test/language/statements/try/12.14-13.js b/test/language/statements/try/12.14-13.js index 01348f2bd790f43be2ec35d4e263c5a2f4f1899a..e932ce8f0d8ce8330afa3f6bdddb696411242f1e 100644 --- a/test/language/statements/try/12.14-13.js +++ b/test/language/statements/try/12.14-13.js @@ -8,6 +8,7 @@ es5id: 12.14-13 description: catch introduces scope - updates are based on scope includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/try/12.14-14.js b/test/language/statements/try/12.14-14.js index 20fc2a22d4ed3ef464f3598967728968ae7001b5..bba924909e09a52b52ceed6df26909ce33ced581 100644 --- a/test/language/statements/try/12.14-14.js +++ b/test/language/statements/try/12.14-14.js @@ -13,6 +13,7 @@ description: > includes: - runTestCase.js - fnGlobalObject.js +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/try/12.14-15.js b/test/language/statements/try/12.14-15.js index 1c556ce2b23e4c5330cbe415da78c200a87d4602..6ce1bf9baf2a27291dcb7ef997a4908aade4cc68 100644 --- a/test/language/statements/try/12.14-15.js +++ b/test/language/statements/try/12.14-15.js @@ -13,6 +13,7 @@ description: > includes: - runTestCase.js - fnGlobalObject.js +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/try/12.14-16.js b/test/language/statements/try/12.14-16.js index b0da76e863b7a9bdeda50f9dadb8c33cb446f491..326e1f9b21221f843184339bbf5f082d78cfe868 100644 --- a/test/language/statements/try/12.14-16.js +++ b/test/language/statements/try/12.14-16.js @@ -13,6 +13,7 @@ description: > includes: - runTestCase.js - fnGlobalObject.js +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/variable/12.2.1-11.js b/test/language/statements/variable/12.2.1-11.js index fce16af7b82019c7923042a495681c809bba01db..9cd6dc61de9b2fe9da5be13400615cf08d62daf6 100644 --- a/test/language/statements/variable/12.2.1-11.js +++ b/test/language/statements/variable/12.2.1-11.js @@ -8,6 +8,7 @@ es5id: 12.2.1-11 description: arguments as var identifier in eval code is allowed includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/variable/12.2.1-12.js b/test/language/statements/variable/12.2.1-12.js index e9d81b7d3b5e3f795e5ca31cc0c39748cbb139f7..d89e436d73d77894d3a061b2fa4cc3045d29c390 100644 --- a/test/language/statements/variable/12.2.1-12.js +++ b/test/language/statements/variable/12.2.1-12.js @@ -8,6 +8,7 @@ es5id: 12.2.1-12 description: arguments as local var identifier is allowed includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/variable/S12.2_A2.js b/test/language/statements/variable/S12.2_A2.js index 3b02e0318eb013a07f42c66f788eebcdd87848cc..fcc3df72fe06530016ac35654643ae09a20d79d0 100644 --- a/test/language/statements/variable/S12.2_A2.js +++ b/test/language/statements/variable/S12.2_A2.js @@ -10,6 +10,7 @@ es5id: 12.2_A2 description: > Checking if deleting global variables that have the attributes {DontDelete} fails +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/variable/S12.2_A5.js b/test/language/statements/variable/S12.2_A5.js index f79de28b9b277a87a19789f7451cd51192594433..877b9c72879accbbdbe084754635916b236359c0 100644 --- a/test/language/statements/variable/S12.2_A5.js +++ b/test/language/statements/variable/S12.2_A5.js @@ -8,6 +8,7 @@ info: > es5id: 12.2_A5 description: Executing eval("var x") includes: [$PRINT.js] +flags: [noStrict] ---*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/variable/S12.2_A9.js b/test/language/statements/variable/S12.2_A9.js index 3b982ad1bfe97b449002e01fa1da5bd6b194ead6..7db9c3997d5058e7b7599c2874d05390a6b2a51f 100644 --- a/test/language/statements/variable/S12.2_A9.js +++ b/test/language/statements/variable/S12.2_A9.js @@ -9,6 +9,8 @@ description: > the declared variable ---*/ +var enumed; + ////////////////////////////////////////////////////////////////////////////// //CHECK#1 for (var __prop in this){ diff --git a/test/language/statements/with/12.10-0-1.js b/test/language/statements/with/12.10-0-1.js index 93dd3acca70d39af198a303552353bd05462febc..dc6980749b997d35a14ee689c91d44bbdcb0d505 100644 --- a/test/language/statements/with/12.10-0-1.js +++ b/test/language/statements/with/12.10-0-1.js @@ -10,6 +10,7 @@ description: > with does not change declaration scope - vars in with are visible outside includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-10.js b/test/language/statements/with/12.10-0-10.js index 3600da00b0c8d2a207beb1f40d1905cc79ceac6c..d08cbf76ed670a33c6cb1a0acb4efafa9f97cc66 100644 --- a/test/language/statements/with/12.10-0-10.js +++ b/test/language/statements/with/12.10-0-10.js @@ -8,6 +8,7 @@ es5id: 12.10-0-10 description: with introduces scope - name lookup finds function parameter includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-11.js b/test/language/statements/with/12.10-0-11.js index cc4c97bb23bc1295966e97685f148ab6d04673d3..04e35866e0fb7b64aa88d281e5382c7f8f1f2e9b 100644 --- a/test/language/statements/with/12.10-0-11.js +++ b/test/language/statements/with/12.10-0-11.js @@ -8,6 +8,7 @@ es5id: 12.10-0-11 description: with introduces scope - name lookup finds inner variable includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-12.js b/test/language/statements/with/12.10-0-12.js index bdf59c5d0fa82b454e892a90b32f3980a00dd270..875fd073ece95f7f162430cd7557e7909bec77dc 100644 --- a/test/language/statements/with/12.10-0-12.js +++ b/test/language/statements/with/12.10-0-12.js @@ -8,6 +8,7 @@ es5id: 12.10-0-12 description: with introduces scope - name lookup finds property includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-3.js b/test/language/statements/with/12.10-0-3.js index 2795e32fc685addc9ac1858556a4350b6481f74f..eed45d343d19e9073550c2ec474a2c98c65b1032 100644 --- a/test/language/statements/with/12.10-0-3.js +++ b/test/language/statements/with/12.10-0-3.js @@ -8,6 +8,7 @@ es5id: 12.10-0-3 description: with introduces scope - that is captured by function expression includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-7.js b/test/language/statements/with/12.10-0-7.js index b87ae05b9211dca6991c4b9313a2493e390a2663..9b9ec3356ae09cf82a8d67979a9428ae52f4ae69 100644 --- a/test/language/statements/with/12.10-0-7.js +++ b/test/language/statements/with/12.10-0-7.js @@ -8,6 +8,7 @@ es5id: 12.10-0-7 description: with introduces scope - scope removed when exiting with statement includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-8.js b/test/language/statements/with/12.10-0-8.js index f1898b810ab03e224ea6c02bc896d21b0bec1256..d87ed1c479fdd4dd62689a87c4d87f6c33daf3d6 100644 --- a/test/language/statements/with/12.10-0-8.js +++ b/test/language/statements/with/12.10-0-8.js @@ -8,6 +8,7 @@ es5id: 12.10-0-8 description: with introduces scope - var initializer sets like named property includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-0-9.js b/test/language/statements/with/12.10-0-9.js index 572df0e663aeb25bbde08a66c6a3c0dcbcdc670f..03cce99b4487618375a04a6cd948afa49c283b1c 100644 --- a/test/language/statements/with/12.10-0-9.js +++ b/test/language/statements/with/12.10-0-9.js @@ -8,6 +8,7 @@ es5id: 12.10-0-9 description: with introduces scope - name lookup finds outer variable includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-2-1.js b/test/language/statements/with/12.10-2-1.js index 6860de42a55bb519dd149a5cfa43f3356993a2ec..5f5f4409545cd999dc4deaa41b1c4d2d93e05e1e 100644 --- a/test/language/statements/with/12.10-2-1.js +++ b/test/language/statements/with/12.10-2-1.js @@ -8,6 +8,7 @@ es5id: 12.10-2-1 description: with - expression being Number includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-2-2.js b/test/language/statements/with/12.10-2-2.js index c60065f22a11185fb3d1296ff8329aca42c89497..c932264959ef77b6dbeea81aaf3a9feb1ae34ea5 100644 --- a/test/language/statements/with/12.10-2-2.js +++ b/test/language/statements/with/12.10-2-2.js @@ -8,6 +8,7 @@ es5id: 12.10-2-2 description: with - expression being Boolean includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-2-3.js b/test/language/statements/with/12.10-2-3.js index ffe633f9d03f3ade11bcd9175396312b17d2e17b..a4b97544b33e28f41eb9a445a0acbc629a74825b 100644 --- a/test/language/statements/with/12.10-2-3.js +++ b/test/language/statements/with/12.10-2-3.js @@ -8,6 +8,7 @@ es5id: 12.10-2-3 description: with - expression being string includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() { diff --git a/test/language/statements/with/12.10-7-1.js b/test/language/statements/with/12.10-7-1.js index dbde66efad122d1507eaa1772c8cef94f6591f80..25ec0136b3c0b84fce9f865af2feb0f8a05aebde 100644 --- a/test/language/statements/with/12.10-7-1.js +++ b/test/language/statements/with/12.10-7-1.js @@ -8,6 +8,7 @@ es5id: 12.10-7-1 description: with introduces scope - restores the earlier environment on exit includes: [runTestCase.js] +flags: [noStrict] ---*/ function testcase() {