mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
This commit is contained in:
parent
8c642b6172
commit
45f7cee019
@ -92,8 +92,6 @@
|
|||||||
<test id="S9.9_A2">https://bugs.ecmascript.org/show_bug.cgi?id=13</test>
|
<test id="S9.9_A2">https://bugs.ecmascript.org/show_bug.cgi?id=13</test>
|
||||||
<test id="S11.1.5_A4.1">https://bugs.ecmascript.org/show_bug.cgi?id=14</test>
|
<test id="S11.1.5_A4.1">https://bugs.ecmascript.org/show_bug.cgi?id=14</test>
|
||||||
<test id="S11.1.5_A4.2">https://bugs.ecmascript.org/show_bug.cgi?id=14</test>
|
<test id="S11.1.5_A4.2">https://bugs.ecmascript.org/show_bug.cgi?id=14</test>
|
||||||
<test id="S11.8.2_A2.3_T1">https://bugs.ecmascript.org/show_bug.cgi?id=15</test>
|
|
||||||
<test id="S11.8.3_A2.3_T1">https://bugs.ecmascript.org/show_bug.cgi?id=15</test>
|
|
||||||
|
|
||||||
<!-- Still invalid after a fix from Google. ES5 doesn't state Chapter 16 extensions
|
<!-- Still invalid after a fix from Google. ES5 doesn't state Chapter 16 extensions
|
||||||
regarding FunctionDeclaration are invalid per-se -->
|
regarding FunctionDeclaration are invalid per-se -->
|
||||||
|
@ -2,24 +2,23 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name: S11.8.2_A2.3_T1;
|
* In ES5, First expression should be evaluated first.
|
||||||
* @section: 11.8.2;
|
*
|
||||||
* @assertion: ToNumber(second expression) is called first, and then ToNumber(first expression);
|
|
||||||
* @description: Checking with "throw";
|
* @description: Checking with "throw";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = { valueOf: function () { throw "x"; } };
|
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,24 +2,23 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name: S11.8.3_A2.3_T1;
|
* In ES5, First expression should be evaluated first.
|
||||||
* @section: 11.8.3;
|
*
|
||||||
* @assertion: ToNumber(second expression) is called first, and then ToNumber(first expression);
|
|
||||||
* @description: Checking with "throw";
|
* @description: Checking with "throw";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = { valueOf: function () { throw "x"; } };
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user