mirror of https://github.com/tc39/test262.git
Merge.
This commit is contained in:
commit
2470de7cd8
test
config
suite/sputnik/Conformance
07_Lexical_Conventions
7.5_Tokens/7.5.3_Future_Reserved_Words
S7.5.3_A1.15.jsS7.5.3_A1.18.jsS7.5.3_A1.21.jsS7.5.3_A1.22.jsS7.5.3_A1.23.jsS7.5.3_A1.24.jsS7.5.3_A1.26.js
7.8_Literals/7.8.4_String_Literals
11_Expressions/11.8_Relational_Operators
11.8.2_The_Greater_than_Operator
11.8.3_The_Less_than_or_equal_Operator
13_Function_Definition
15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor
|
@ -87,13 +87,10 @@
|
|||
<test id="S15.9.3.1_A5_T6">https://bugs.ecmascript.org/show_bug.cgi?id=11</test>
|
||||
-->
|
||||
|
||||
<test id="S7.5.3_A1.15">https://bugs.ecmascript.org/show_bug.cgi?id=12</test>
|
||||
<test id="S9.9_A1">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.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
|
||||
regarding FunctionDeclaration are invalid per-se -->
|
||||
|
@ -116,11 +113,6 @@
|
|||
|
||||
<test id="S15.5.4.8_A1_T11">https://bugs.ecmascript.org/show_bug.cgi?id=30</test>
|
||||
|
||||
<test id="S7.8.4_A6.4_T1">https://bugs.ecmascript.org/show_bug.cgi?id=58</test>
|
||||
<test id="S7.8.4_A6.4_T2">https://bugs.ecmascript.org/show_bug.cgi?id=58</test>
|
||||
<test id="S7.8.4_A7.4_T1">https://bugs.ecmascript.org/show_bug.cgi?id=58</test>
|
||||
<test id="S7.8.4_A7.4_T2">https://bugs.ecmascript.org/show_bug.cgi?id=58</test>
|
||||
|
||||
<test id="S15.5.4.14_A1_T6">https://bugs.ecmascript.org/show_bug.cgi?id=61</test>
|
||||
<test id="S15.5.4.14_A1_T7">https://bugs.ecmascript.org/show_bug.cgi?id=61</test>
|
||||
<test id="S15.5.4.14_A2_T7">https://bugs.ecmascript.org/show_bug.cgi?id=61</test>
|
||||
|
@ -131,8 +123,6 @@
|
|||
<test id="15.4.4.4-5-c-i-1">https://bugs.ecmascript.org/show_bug.cgi?id=69</test>
|
||||
|
||||
<!-- Extension clause -->
|
||||
<test id="S13.0_A5">https://bugs.ecmascript.org/show_bug.cgi?id=133</test>
|
||||
<test id="S15.10.4.1_A5_T5">https://bugs.ecmascript.org/show_bug.cgi?id=128</test>
|
||||
<test id="S7.8.4_A4.3_T5">https://bugs.ecmascript.org/show_bug.cgi?id=127</test>
|
||||
<test id="S7.8.4_A4.3_T6">https://bugs.ecmascript.org/show_bug.cgi?id=127</test>
|
||||
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
* @negative
|
||||
* @strict_only
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
var implements = 1;
|
|
@ -8,6 +8,7 @@
|
|||
* @description: Checking if execution of "interface = 1" fails in
|
||||
* strict code;
|
||||
* @negative
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* @assertion: The "package" token can not be used as identifier in strict code;
|
||||
* @description: Checking if execution of "package=1" fails in strict code;
|
||||
* @negative
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* @assertion: The "private" token can not be used as identifier in strict code;
|
||||
* @description: Checking if execution of "private=1" fails in strict code;
|
||||
* @negative
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
* @description: Checking if execution of "protected=1" fails in
|
||||
* strict code;
|
||||
* @negative
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* @assertion: The "public" token can not be used as identifier in strict code;
|
||||
* @description: Checking if execution of "public=1" fails in strict code;
|
||||
* @negative
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* @assertion: The "static" token can not be used as identifier in strict code;
|
||||
* @description: Checking if execution of "static=1" fails in strict code;
|
||||
* @negative
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S7.8.4_A6.4_T1;
|
||||
* @section: 7.8.4;
|
||||
* @assertion: HexEscapeSequence \X HexDigit HexDigit is incorrect;
|
||||
* @description: Checking if execution of "\X01" passes;
|
||||
* @negative
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
"\X01"
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S7.8.4_A6.4_T2;
|
||||
* @section: 7.8.4;
|
||||
* @assertion: HexEscapeSequence \X HexDigit HexDigit is incorrect;
|
||||
* @description: Checking if execution of "\X0A" passes;
|
||||
* @negative
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
"\X0A"
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S7.8.4_A7.4_T1;
|
||||
* @section: 7.8.4;
|
||||
* @assertion: UnicodeEscapeSequence \U HexDigit HexDigit HexDigit HexDigit is incorrect;
|
||||
* @description: Checking if execution of "\U0001" passes;
|
||||
* @negative
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
"\U0001"
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S7.8.4_A7.4_T2;
|
||||
* @section: 7.8.4;
|
||||
* @assertion: UnicodeEscapeSequence \U HexDigit HexDigit HexDigit HexDigit is incorrect;
|
||||
* @description: Checking if execution of "\U000A" passes;
|
||||
* @negative
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
"\U000A"
|
|
@ -2,24 +2,23 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S11.8.2_A2.3_T1;
|
||||
* @section: 11.8.2;
|
||||
* @assertion: ToNumber(second expression) is called first, and then ToNumber(first expression);
|
||||
* In ES5, First expression should be evaluated first.
|
||||
*
|
||||
* @description: Checking with "throw";
|
||||
*/
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,24 +2,23 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S11.8.3_A2.3_T1;
|
||||
* @section: 11.8.3;
|
||||
* @assertion: ToNumber(second expression) is called first, and then ToNumber(first expression);
|
||||
* In ES5, First expression should be evaluated first.
|
||||
*
|
||||
* @description: Checking with "throw";
|
||||
*/
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S13_A5;
|
||||
* @section: 13, 10.1.2;
|
||||
* @assertion: Only FormalParameterList as arguments list is allowed;
|
||||
* @description: Trying to use [arg1, arg2, arg3], (arg1, arg2, arg3), etc. as a FormalParameterList;
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
try{
|
||||
eval("function __func([arg1, arg2, arg3]){return arguments.length;}");
|
||||
$ERROR('#1: eval("function __func([arg1, arg2, arg3]){return arguments.length;}") lead to throwing exception');
|
||||
} catch(e){
|
||||
if(!(e instanceof SyntaxError)){
|
||||
$ERROR('#1.1: eval("function __func([arg1, arg2, arg3]){return arguments.length;}") lead to throwing exception of SyntaxError. Actual: exception is '+e);
|
||||
}
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#2
|
||||
try{
|
||||
eval("function __func((arg1, arg2, arg3)){return arguments.length;}");
|
||||
$ERROR('#2: eval("function __func((arg1, arg2, arg3)){return arguments.length;}") lead to throwing exception')
|
||||
} catch(e){
|
||||
if(!(e instanceof SyntaxError)){
|
||||
$ERROR('#2.1: eval("function __func((arg1, arg2, arg3)){return arguments.length;}") lead to throwing exception of SyntaxError. Actual: exception is '+e);
|
||||
}
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#3
|
||||
try{
|
||||
eval("function __func(arg1, arg2, arg3,){return arguments.length;}");
|
||||
$ERROR('#3: eval("function __func(arg1, arg2, arg3,){return arguments.length;}") lead to throwing exception')
|
||||
} catch(e){
|
||||
if(!(e instanceof SyntaxError)){
|
||||
$ERROR('#3.1: eval("function __func(arg1, arg2, arg3,){return arguments.length;}") lead to throwing exception of SyntaxError. Actual: exception is '+e);
|
||||
}
|
||||
}
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/**
|
||||
* @name: S15.10.4.1_A5_T5;
|
||||
* @section: 15.10.4.1;
|
||||
* @assertion: If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception;
|
||||
* @description: Checking if using "{toString:function(){return "x";}}" as F leads to throwing the correct exception;
|
||||
*/
|
||||
|
||||
//CHECK#1
|
||||
try {
|
||||
$ERROR('#1.1: new RegExp("a|b|[a-b]",{toString:function(){return "x" throw SyntaxError. Actual: ' + (new RegExp("a|b|[a-b]",{toString:function(){return "x"}})));
|
||||
} catch (e) {
|
||||
if ((e instanceof SyntaxError) !== true) {
|
||||
$ERROR('#1.2: new RegExp("a|b|[a-b]",{toString:function(){return "x" throw SyntaxError. Actual: ' + (e));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue