summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2015-03-23 17:34:52 +0100
committerBrian Terlson <brian.terlson@microsoft.com>2015-04-08 15:54:58 -0700
commit15cc639131c8953e5038879c7d1acff98b46c5dc (patch)
tree28e1bdfb33be7c21c1d0d769add788c26111ebb7
parent47dcfe8cac39f3f72207561a7d3b4cb968c964dc (diff)
downloadqtdeclarative-testsuites-15cc639131c8953e5038879c7d1acff98b46c5dc.tar.gz
Strict eval variable declarations are lexically scoped, assign expected result value to a previously declared global (issue #35)
Add missing variable declarations (issue #35) Split S12.6.3_A10 and S12.6.3_A10.1 because both files seem to test implicit global variables (issue #35) Changes (issue #35) - Add missing noStrict flags. - Change 13.2-15-1 and 13.2-18-1 to use assert.js and propertyHelper.js (simplifies writable and configurable checks while in strict mode). - Add variable declarations for globals. - Create copies of S13.2.1_A6_T1 and S13.2.1_A6_T2 instead of adding variable declarations, because both files seem to test implicit global variables. - Split S13_A14 and S13_A16 to work in strict mode. - Remove assignment to .name property. Add missing noStrict flags (issue #35) Add missing noStrict flags and variable declarations (issue #35) Add missing noStrict flags (issue #35)
-rw-r--r--test/language/statements/break/S12.8_A2.js18
-rw-r--r--test/language/statements/continue/S12.7_A2.js18
-rw-r--r--test/language/statements/expression/S12.4_A2_T1.js2
-rw-r--r--test/language/statements/expression/S12.4_A2_T2.js2
-rw-r--r--test/language/statements/for/S12.6.3_A10.1_T1.js (renamed from test/language/statements/for/S12.6.3_A10.1.js)1
-rw-r--r--test/language/statements/for/S12.6.3_A10.1_T2.js113
-rw-r--r--test/language/statements/for/S12.6.3_A10_T1.js (renamed from test/language/statements/for/S12.6.3_A10.js)1
-rw-r--r--test/language/statements/for/S12.6.3_A10_T2.js53
-rw-r--r--test/language/statements/function/13.1-1-1.js1
-rw-r--r--test/language/statements/function/13.1-1-2.js1
-rw-r--r--test/language/statements/function/13.1-2-1.js1
-rw-r--r--test/language/statements/function/13.1-2-2.js1
-rw-r--r--test/language/statements/function/13.1-2-5.js1
-rw-r--r--test/language/statements/function/13.1-2-6.js1
-rw-r--r--test/language/statements/function/13.1-3-1.js1
-rw-r--r--test/language/statements/function/13.1-3-2.js1
-rw-r--r--test/language/statements/function/13.1-3-7.js1
-rw-r--r--test/language/statements/function/13.1-3-8.js1
-rw-r--r--test/language/statements/function/13.2-15-1.js30
-rw-r--r--test/language/statements/function/13.2-18-1.js72
-rw-r--r--test/language/statements/function/S13.2.1_A6_T1.js1
-rw-r--r--test/language/statements/function/S13.2.1_A6_T2.js1
-rwxr-xr-xtest/language/statements/function/S13.2.1_A6_T3.js31
-rwxr-xr-xtest/language/statements/function/S13.2.1_A6_T4.js31
-rw-r--r--test/language/statements/function/S13.2.1_A7_T3.js1
-rw-r--r--test/language/statements/function/S13.2.2_A15_T2.js2
-rw-r--r--test/language/statements/function/S13.2.2_A15_T3.js2
-rw-r--r--test/language/statements/function/S13.2.2_A15_T4.js2
-rw-r--r--test/language/statements/function/S13.2.2_A17_T2.js1
-rw-r--r--test/language/statements/function/S13.2.2_A17_T3.js1
-rw-r--r--test/language/statements/function/S13.2.2_A18_T1.js1
-rw-r--r--test/language/statements/function/S13.2.2_A18_T2.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T1.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T2.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T3.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T4.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T5.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T6.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T7.js1
-rw-r--r--test/language/statements/function/S13.2.2_A19_T8.js1
-rw-r--r--test/language/statements/function/S13.2.2_A1_T1.js2
-rw-r--r--test/language/statements/function/S13.2.2_A1_T2.js2
-rw-r--r--test/language/statements/function/S13.2.2_A2.js2
-rw-r--r--test/language/statements/function/S13.2.2_A4_T2.js2
-rw-r--r--test/language/statements/function/S13.2.2_A5_T1.js2
-rw-r--r--test/language/statements/function/S13.2.2_A5_T2.js2
-rw-r--r--test/language/statements/function/S13.2.2_A6_T1.js2
-rw-r--r--test/language/statements/function/S13.2.2_A7_T2.js2
-rw-r--r--test/language/statements/function/S13_A11_T1.js1
-rw-r--r--test/language/statements/function/S13_A11_T2.js1
-rw-r--r--test/language/statements/function/S13_A12_T1.js1
-rw-r--r--test/language/statements/function/S13_A12_T2.js1
-rw-r--r--test/language/statements/function/S13_A14_T1.js (renamed from test/language/statements/function/S13_A14.js)1
-rwxr-xr-xtest/language/statements/function/S13_A14_T2.js18
-rw-r--r--test/language/statements/function/S13_A15_T1.js1
-rw-r--r--test/language/statements/function/S13_A15_T2.js1
-rw-r--r--test/language/statements/function/S13_A15_T3.js1
-rw-r--r--test/language/statements/function/S13_A15_T4.js1
-rw-r--r--test/language/statements/function/S13_A15_T5.js1
-rw-r--r--test/language/statements/function/S13_A16_T1.js (renamed from test/language/statements/function/S13_A16.js)1
-rwxr-xr-xtest/language/statements/function/S13_A16_T2.js40
-rw-r--r--test/language/statements/try/12.14-13.js1
-rw-r--r--test/language/statements/try/12.14-14.js1
-rw-r--r--test/language/statements/try/12.14-15.js1
-rw-r--r--test/language/statements/try/12.14-16.js1
-rw-r--r--test/language/statements/variable/12.2.1-11.js1
-rw-r--r--test/language/statements/variable/12.2.1-12.js1
-rw-r--r--test/language/statements/variable/S12.2_A2.js1
-rw-r--r--test/language/statements/variable/S12.2_A5.js1
-rw-r--r--test/language/statements/variable/S12.2_A9.js2
-rw-r--r--test/language/statements/with/12.10-0-1.js1
-rw-r--r--test/language/statements/with/12.10-0-10.js1
-rw-r--r--test/language/statements/with/12.10-0-11.js1
-rw-r--r--test/language/statements/with/12.10-0-12.js1
-rw-r--r--test/language/statements/with/12.10-0-3.js1
-rw-r--r--test/language/statements/with/12.10-0-7.js1
-rw-r--r--test/language/statements/with/12.10-0-8.js1
-rw-r--r--test/language/statements/with/12.10-0-9.js1
-rw-r--r--test/language/statements/with/12.10-2-1.js1
-rw-r--r--test/language/statements/with/12.10-2-2.js1
-rw-r--r--test/language/statements/with/12.10-2-3.js1
-rw-r--r--test/language/statements/with/12.10-7-1.js1
82 files changed, 423 insertions, 87 deletions
diff --git a/test/language/statements/break/S12.8_A2.js b/test/language/statements/break/S12.8_A2.js
index 9c231b2b7..9c06bdbcf 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 1a4aa7c5f..73bc2c696 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 e79747d9c..f92959601 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 50696d237..cca391742 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
index 8d74ca271..5cf7aafb0 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 000000000..10dec59ef
--- /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
index d2c7903da..458c36034 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 000000000..6b4743e79
--- /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 1b83c23a8..e38334500 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 9b7ba19ea..93de15fbe 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 018f0098c..f0e7b84e2 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 b60482d5e..a4cc5dc9a 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 9b069fbf6..942cd44e1 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 0bfb81b09..06da75092 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 d75777447..7a6b4bbe2 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 05b072031..681270f6d 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 0a059e469..07275c58f 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 356dbc78a..3b95fcc5f 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 0e2952a34..0105301be 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 8d7b8af24..653d4829b 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 1afa26711..6e51aa8fe 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 a20aa33fe..78f562d50 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 000000000..6f7ca5fbc
--- /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 000000000..e3a6cd749
--- /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 7fc0140bf..8b5d1356a 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 94c9ad3e0..cf8ac4aa4 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 f2ef353f4..48af37853 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 cba1f2d3d..761ad82e5 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 950ee3dd8..403014d04 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 24accb026..a1d5c333c 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 1c7b2f98f..1b2022b84 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 e923408c3..ea34b4fbb 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 714c0d55e..4a7e06bab 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 42beeafad..f5ae02475 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 1a2c07678..baf7e4f31 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 a3020aae5..edd4dfa34 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 9b275ccda..52b88a1fa 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 99da95ff3..90c2f36de 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 dbb588905..f2b00a9ce 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 32ff0251a..feeee3f0f 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 4abaf96d2..aef9ccf7c 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 32c124b4d..b0cc1ebf0 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 ac9d419f1..b004dfebf 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 678c08b0e..661364523 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 5899ec92b..4e8c8cf00 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 c73bab462..8636c8e16 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 128a071f1..8cf1b704c 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 80774ed54..30ecf2a2c 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 8f60d3a26..1f61478f4 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 430413931..d98c18017 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 5d927f44f..b665fe9df 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 24f83d0c3..46f81baae 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
index b323b1bce..605177624 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 000000000..f28b51c5f
--- /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 725567570..8a4286423 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 f3bf4276e..241ee049c 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 2931c034d..f4f741928 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 72acf77b1..9f8524db5 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 5e2cf9e66..9563b7839 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
index 6d2bdbea9..11dba26c6 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 000000000..00fbf5995
--- /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 01348f2bd..e932ce8f0 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 20fc2a22d..bba924909 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 1c556ce2b..6ce1bf9ba 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 b0da76e86..326e1f9b2 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 fce16af7b..9cd6dc61d 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 e9d81b7d3..d89e436d7 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 3b02e0318..fcc3df72f 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 f79de28b9..877b9c728 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 3b982ad1b..7db9c3997 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 93dd3acca..dc6980749 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 3600da00b..d08cbf76e 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 cc4c97bb2..04e35866e 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 bdf59c5d0..875fd073e 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 2795e32fc..eed45d343 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 b87ae05b9..9b9ec3356 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 f1898b810..d87ed1c47 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 572df0e66..03cce99b4 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 6860de42a..5f5f44095 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 c60065f22..c93226495 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 ffe633f9d..a4b97544b 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 dbde66efa..25ec0136b 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() {