Regenerated from last bug fixed to pre-converted sources.

This commit is contained in:
Mark Miller 2011-09-25 15:11:03 -07:00
parent f9fa3d1e82
commit e4aebe55c7
9 changed files with 41 additions and 64 deletions

View File

@ -10,4 +10,6 @@
* @negative
*/
"use strict";
var implements = 1;

View File

@ -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"

View File

@ -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"

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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');
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);