Skip to content
Snippets Groups Projects
Commit e4aebe55 authored by Mark Miller's avatar Mark Miller
Browse files

Regenerated from last bug fixed to pre-converted sources.

parent f9fa3d1e
No related branches found
No related tags found
No related merge requests found
Showing
with 41 additions and 64 deletions
...@@ -10,4 +10,6 @@ ...@@ -10,4 +10,6 @@
* @negative * @negative
*/ */
"use strict";
var implements = 1; var implements = 1;
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
* *
* @path 07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js * @path 07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T1.js
* @description EscapeCharacter :: DecimalDigits :: 1 * @description EscapeCharacter :: DecimalDigits :: 1
* @onlyStrict
* @negative * @negative
*/ */
"use strict";
//CHECK#1 //CHECK#1
"\1" "\1"
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
* *
* @path 07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js * @path 07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A4.3_T2.js
* @description EscapeCharacter :: DecimalDigits :: 7 * @description EscapeCharacter :: DecimalDigits :: 7
* @onlyStrict
* @negative * @negative
*/ */
"use strict";
//CHECK#1 //CHECK#1
"\7" "\7"
...@@ -31,25 +31,3 @@ catch(e){ ...@@ -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));
}
}
...@@ -31,25 +31,3 @@ catch(e){ ...@@ -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));
}
}
...@@ -13,13 +13,23 @@ ...@@ -13,13 +13,23 @@
*/ */
"use strict"; "use strict";
var deleted = 'unassigned';
try {
deleted = delete RegExp.leftContext;
} catch (err) {
} var reNames = Object.getOwnPropertyNames(RegExp);
if (deleted === false) { for (var i = 0, len = reNames.length; i < len; i++) {
$ERROR('Strict delete returned false'); 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');
}
}
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // 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 * @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" * @description Checking with "throw"
...@@ -13,13 +13,13 @@ var x = { valueOf: function () { throw "x"; } }; ...@@ -13,13 +13,13 @@ var x = { valueOf: function () { throw "x"; } };
var y = { valueOf: function () { throw "y"; } }; var y = { valueOf: function () { throw "y"; } };
try { try {
x > y; 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) { } catch (e) {
if (e === "x") { if (e === "y") {
$ERROR('#1.2: ToNumber(second expression) is called first, and then ToNumber(first expression)'); $ERROR('#1.2: First expression should be evaluated first');
} else { } else {
if (e !== "y") { if (e !== "x") {
$ERROR('#1.3: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; x > y throw "y". Actual: ' + (e)); $ERROR('#1.3: Failed with: ' + e);
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // 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 * @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" * @description Checking with "throw"
...@@ -13,13 +13,13 @@ var x = { valueOf: function () { throw "x"; } }; ...@@ -13,13 +13,13 @@ var x = { valueOf: function () { throw "x"; } };
var y = { valueOf: function () { throw "y"; } }; var y = { valueOf: function () { throw "y"; } };
try { try {
x <= y; 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) { } catch (e) {
if (e === "x") { if (e === "y") {
$ERROR('#1.2: ToNumber(second expression) is called first, and then ToNumber(first expression)'); $ERROR('#1.2: First expression should be evaluated first');
} else { } else {
if (e !== "y") { if (e !== "x") {
$ERROR('#1.3: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; x <= y throw "y". Actual: ' + (e)); $ERROR('#1.3: Failed with: ' + e);
} }
} }
} }
......
...@@ -27,12 +27,15 @@ ...@@ -27,12 +27,15 @@
function testcase() { function testcase() {
"use strict"; "use strict";
var errorBackup = Error;
try { try {
eval("delete Error;"); eval("delete Error;");
return false; return false;
} catch (e) { } catch (e) {
return e instanceof SyntaxError; return e instanceof SyntaxError;
} finally {
Error = errorBackup;
} }
} }
runTestCase(testcase); runTestCase(testcase);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment