summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMark Miller <erights@gmail.com>2011-09-25 15:11:03 -0700
committerMark Miller <erights@gmail.com>2011-09-25 15:11:03 -0700
commit33522cb5c9c33be1abec6d36956f6f6bb3461e4e (patch)
tree41427657d88c341f66ff7dec06fc4765f27fb4f8 /test
parent4567b257cde09050dc12812c2b2a8b5b67512430 (diff)
downloadtest262-33522cb5c9c33be1abec6d36956f6f6bb3461e4e.tar.gz
Regenerated from last bug fixed to pre-converted sources.
Diffstat (limited to 'test')
-rw-r--r--test/suite/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js2
-rw-r--r--test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js3
-rw-r--r--test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js3
-rw-r--r--test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A1.js22
-rw-r--r--test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A2.js22
-rw-r--r--test/suite/11_Expressions/11.4_Unary_Operators/11.4.1_The_delete_Operator/S11.4.1_A5.js24
-rw-r--r--test/suite/11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1.js12
-rw-r--r--test/suite/11_Expressions/11.8_Relational_Operators/11.8.3_The_Less_than_or_equal_Operator/S11.8.3_A2.3_T1.js12
-rw-r--r--test/suite/chapter11/11.4/11.4.1/11.4.1-5-a-26-s.js5
9 files changed, 41 insertions, 64 deletions
diff --git a/test/suite/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js b/test/suite/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js
index 409a757eb..1ec288135 100644
--- a/test/suite/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js
+++ b/test/suite/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.15.js
@@ -10,4 +10,6 @@
* @negative
*/
+"use strict";
+
var implements = 1;
diff --git a/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js b/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js
index 009c7914c..d18a67829 100644
--- a/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js
+++ b/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js
@@ -6,9 +6,12 @@
*
* @path 07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js
* @description EscapeCharacter :: DecimalDigits :: 1
+ * @onlyStrict
* @negative
*/
+"use strict";
+
//CHECK#1
"\1"
diff --git a/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js b/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js
index c85850f51..5ca8a01fd 100644
--- a/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js
+++ b/test/suite/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js
@@ -6,9 +6,12 @@
*
* @path 07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js
* @description EscapeCharacter :: DecimalDigits :: 7
+ * @onlyStrict
* @negative
*/
+"use strict";
+
//CHECK#1
"\7"
diff --git a/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A1.js b/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A1.js
index 8c7f2e594..c7f281907 100644
--- a/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A1.js
+++ b/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A1.js
@@ -31,25 +31,3 @@ catch(e){
}
}
-// CHECK#3
-try{
- for(var y in undefined) y = 2;
- $ERROR('#3.1: for(var y in undefined) y = 2 must throw TypeError. Actual: y === ' + (y));
-}
-catch(e){
- if((e instanceof TypeError) !== true){
- $ERROR('#3.2: for(var y in undefined) y = 2 must throw TypeError. Actual: ' + (e));
- }
-}
-
-// CHECK#4
-try{
- for(var z in this.foo) z = 2;
- $ERROR('#4.1: for(var z in this.foo) z = 2 must throw TypeError. Actual: z === ' + (z));
-}
-catch(e){
- if((e instanceof TypeError) !== true){
- $ERROR('#4.2: for(var z in this.foo) z = 2 must throw TypeError. Actual: ' + (e));
- }
-}
-
diff --git a/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A2.js b/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A2.js
index d27ed9371..4e9647c60 100644
--- a/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A2.js
+++ b/test/suite/09_Type_Conversion/9.9_ToObject/S9.9_A2.js
@@ -31,25 +31,3 @@ catch(e){
}
}
-// CHECK#3
-try{
- for(var y in null) y = 2;
- $ERROR('#3.1: for(var y in null) y = 2 must throw TypeError. Actual: y === . Actual: ' + (y));
-}
-catch(e){
- if((e instanceof TypeError) !== true){
- $ERROR('#3.2: for(var y in null) y = 2 must throw TypeError. Actual: ' + (e));
- }
-}
-
-// CHECK#4
-try{
- for(var z in 'bbb'.match(/aaa/)) z = 2;
- $ERROR('#4.1: for(var z in \'bbb\'.match(/aaa/)) z = 2 must throw TypeError. Actual: z === . Actual: ' + (z));
-}
-catch(e){
- if((e instanceof TypeError) !== true){
- $ERROR('#4.2: for(var z in \'bbb\'.match(/aaa/)) z = 2 must throw TypeError. Actual: ' + (e));
- }
-}
-
diff --git a/test/suite/11_Expressions/11.4_Unary_Operators/11.4.1_The_delete_Operator/S11.4.1_A5.js b/test/suite/11_Expressions/11.4_Unary_Operators/11.4.1_The_delete_Operator/S11.4.1_A5.js
index 7cd8d9d90..15854417b 100644
--- a/test/suite/11_Expressions/11.4_Unary_Operators/11.4.1_The_delete_Operator/S11.4.1_A5.js
+++ b/test/suite/11_Expressions/11.4_Unary_Operators/11.4.1_The_delete_Operator/S11.4.1_A5.js
@@ -13,13 +13,23 @@
*/
"use strict";
-var deleted = 'unassigned';
-try {
- deleted = delete RegExp.leftContext;
-} catch (err) {
-}
-if (deleted === false) {
- $ERROR('Strict delete returned false');
+var reNames = Object.getOwnPropertyNames(RegExp);
+for (var i = 0, len = reNames.length; i < len; i++) {
+ var reName = reNames[i];
+ if (reName !== 'prototype') {
+ var deleted = 'unassigned';
+ try {
+ deleted = delete RegExp[reName];
+ } catch (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR('#1: strict delete threw a non-TypeError: ' + err);
+ }
+ // fall through
+ }
+ if (deleted === false) {
+ $ERROR('#2: Strict delete returned false');
+ }
+ }
}
diff --git a/test/suite/11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1.js b/test/suite/11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1.js
index 260c112a5..12bf4791b 100644
--- a/test/suite/11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1.js
+++ b/test/suite/11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1.js
@@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/**
- * ToNumber(second expression) is called first, and then ToNumber(first expression)
+ * In ES5, First expression should be evaluated first.
*
* @path 11_Expressions/11.8_Relational_Operators/11.8.2_The_Greater_than_Operator/S11.8.2_A2.3_T1.js
* @description Checking with "throw"
@@ -13,13 +13,13 @@ var x = { valueOf: function () { throw "x"; } };
var y = { valueOf: function () { throw "y"; } };
try {
x > y;
- $ERROR('#1.1: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; x > y throw "y". Actual: ' + (x > y));
+ $ERROR('#1.1: Should have thrown');
} catch (e) {
- if (e === "x") {
- $ERROR('#1.2: ToNumber(second expression) is called first, and then ToNumber(first expression)');
+ if (e === "y") {
+ $ERROR('#1.2: First expression should be evaluated first');
} else {
- if (e !== "y") {
- $ERROR('#1.3: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; x > y throw "y". Actual: ' + (e));
+ if (e !== "x") {
+ $ERROR('#1.3: Failed with: ' + e);
}
}
}
diff --git a/test/suite/11_Expressions/11.8_Relational_Operators/11.8.3_The_Less_than_or_equal_Operator/S11.8.3_A2.3_T1.js b/test/suite/11_Expressions/11.8_Relational_Operators/11.8.3_The_Less_than_or_equal_Operator/S11.8.3_A2.3_T1.js
index 8afb6919d..b8bc9130a 100644
--- a/test/suite/11_Expressions/11.8_Relational_Operators/11.8.3_The_Less_than_or_equal_Operator/S11.8.3_A2.3_T1.js
+++ b/test/suite/11_Expressions/11.8_Relational_Operators/11.8.3_The_Less_than_or_equal_Operator/S11.8.3_A2.3_T1.js
@@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/**
- * ToNumber(second expression) is called first, and then ToNumber(first expression)
+ * In ES5, First expression should be evaluated first.
*
* @path 11_Expressions/11.8_Relational_Operators/11.8.3_The_Less_than_or_equal_Operator/S11.8.3_A2.3_T1.js
* @description Checking with "throw"
@@ -13,13 +13,13 @@ var x = { valueOf: function () { throw "x"; } };
var y = { valueOf: function () { throw "y"; } };
try {
x <= y;
- $ERROR('#1.1: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; x <= y throw "y". Actual: ' + (x <= y));
+ $ERROR('#1.1: Should have thrown');
} catch (e) {
- if (e === "x") {
- $ERROR('#1.2: ToNumber(second expression) is called first, and then ToNumber(first expression)');
+ if (e === "y") {
+ $ERROR('#1.2: First expression should be evaluated first');
} else {
- if (e !== "y") {
- $ERROR('#1.3: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; x <= y throw "y". Actual: ' + (e));
+ if (e !== "x") {
+ $ERROR('#1.3: Failed with: ' + e);
}
}
}
diff --git a/test/suite/chapter11/11.4/11.4.1/11.4.1-5-a-26-s.js b/test/suite/chapter11/11.4/11.4.1/11.4.1-5-a-26-s.js
index 2bac0322c..5f50568ee 100644
--- a/test/suite/chapter11/11.4/11.4.1/11.4.1-5-a-26-s.js
+++ b/test/suite/chapter11/11.4/11.4.1/11.4.1-5-a-26-s.js
@@ -27,12 +27,15 @@
function testcase() {
"use strict";
-
+ var errorBackup = Error;
try {
eval("delete Error;");
return false;
} catch (e) {
return e instanceof SyntaxError;
+ } finally {
+ Error = errorBackup;
}
+
}
runTestCase(testcase);