Modified: trunk/LayoutTests/js/parser-syntax-check-expected.txt (201565 => 201566)
--- trunk/LayoutTests/js/parser-syntax-check-expected.txt 2016-06-01 20:15:23 UTC (rev 201565)
+++ trunk/LayoutTests/js/parser-syntax-check-expected.txt 2016-06-01 20:32:57 UTC (rev 201566)
@@ -137,8 +137,8 @@
PASS Invalid: "function f() { a(5 }"
PASS Invalid: "a(5,"
PASS Invalid: "function f() { a(5, }"
-PASS Valid: "a(5,)" with ReferenceError
-PASS Valid: "function f() { a(5,) }"
+PASS Invalid: "a(5,)"
+PASS Invalid: "function f() { a(5,) }"
PASS Invalid: "a(5,6"
PASS Invalid: "function f() { a(5,6 }"
PASS Valid: "a(b[7], c <d> e.l, new a() > b)" with ReferenceError
@@ -172,8 +172,8 @@
PASS Invalid: "function f() { function () {} }"
PASS Invalid: "function f(a b) {}"
PASS Invalid: "function f() { function f(a b) {} }"
-PASS Valid: "function f(a,) {}"
-PASS Valid: "function f() { function f(a,) {} }"
+PASS Invalid: "function f(a,) {}"
+PASS Invalid: "function f() { function f(a,) {} }"
PASS Invalid: "function f(a,"
PASS Invalid: "function f() { function f(a, }"
PASS Invalid: "function f(a, 1) {}"
Modified: trunk/LayoutTests/sputnik/Conformance/13_Function_Definition/S13_A5.html (201565 => 201566)
--- trunk/LayoutTests/sputnik/Conformance/13_Function_Definition/S13_A5.html 2016-06-01 20:15:23 UTC (rev 201565)
+++ trunk/LayoutTests/sputnik/Conformance/13_Function_Definition/S13_A5.html 2016-06-01 20:32:57 UTC (rev 201566)
@@ -100,11 +100,11 @@
//////////////////////////////////////////////////////////////////////////////
//CHECK#3
try{
- eval("function __func(arg1, arg2, arg3,,){return arguments.length;}");
- testFailed('#3: eval("function __func(arg1, arg2, arg3,,){return arguments.length;}") lead to throwing exception')
+ eval("function __func(arg1, arg2, arg3,){return arguments.length;}");
+ testFailed('#3: eval("function __func(arg1, arg2, arg3,){return arguments.length;}") lead to throwing exception')
} catch(e){
if(!(e instanceof SyntaxError)){
- testFailed('#3.1: eval("function __func(arg1, arg2, arg3,,){return arguments.length;}") lead to throwing exception of SyntaxError. Actual: exception is '+e);
+ testFailed('#3.1: eval("function __func(arg1, arg2, arg3,){return arguments.length;}") lead to throwing exception of SyntaxError. Actual: exception is '+e);
}
}
//
Deleted: trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js (201565 => 201566)
--- trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js 2016-06-01 20:15:23 UTC (rev 201565)
+++ trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js 2016-06-01 20:32:57 UTC (rev 201566)
@@ -1,63 +0,0 @@
-function test(result, expected, message) {
- if (result !== expected)
- throw "Error: " + message + ". was: " + result + " wanted: " + expected;
-}
-
-function evalWithThrow(text) {
- var result;
- try {
- result = eval(text);
- } catch (error) {
- return error.toString();
- }
- return result;
-}
-
-test(evalWithThrow('typeof function(,){ return a; }'), 'SyntaxError: Unexpected token \',\'. Expected a parameter pattern or a \')\' in parameter list.');
-test(evalWithThrow('typeof function(a,,){ return a; }'), 'SyntaxError: Unexpected token \',\'. Expected a parameter pattern or a \')\' in parameter list.');
-test(evalWithThrow('function a(a, ...last,){ return; }'), 'SyntaxError: Unexpected token \',\'. Rest parameter should be the last parameter in a function declaration.');
-test(eval('typeof function(a,){ return a; }'), 'function');
-test(eval('typeof function(a, b,){ return a + b; }'), 'function');
-test(eval('typeof function(a, b, c, ){ return a + b + c; }'), 'function');
-
-test(evalWithThrow('typeof ((,)=>{ return a; })'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('typeof ((a,,)=>{ return a; })'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('typeof ((a, ...last,)=>{ return a; })'), 'SyntaxError: Unexpected token \'...\'');
-test(eval('typeof ((a,)=>{ return a; })'), 'function');
-test(eval('typeof ((a, b,)=>{ return a + b; })'), 'function');
-test(eval('typeof ((a, b, c)=>{ return a + b + c; })'), 'function');
-
-test(evalWithThrow('typeof ((,)=>a)'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('typeof ((a,,)=>a)'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('(a,...last,)=>0;'), 'SyntaxError: Unexpected token \'...\'');
-test(eval('typeof ((a,)=>a)'), 'function');
-test(eval('typeof ((a, b,)=>a + b)'), 'function');
-test(eval('typeof ((a, b, c)=>a + b + c)'), 'function');
-
-test(evalWithThrow('typeof ((,)=>a)'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('typeof ((a,,)=>a)'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('(a,...last,)=>0;'), 'SyntaxError: Unexpected token \'...\'');
-test(eval('typeof ((a,)=>a)'), 'function');
-test(eval('typeof ((a, b,)=>a + b)'), 'function');
-test(eval('typeof ((a, b, c)=>a + b + c)'), 'function');
-
-test(evalWithThrow('typeof function(a = "x0",,){ return a; }'), 'SyntaxError: Unexpected token \',\'. Expected a parameter pattern or a \')\' in parameter list.');
-test(evalWithThrow('typeof function(a = "x0",...last,){ return a; }'), 'SyntaxError: Unexpected token \',\'. Rest parameter should be the last parameter in a function declaration.');
-test(eval('typeof function(a = "x0",){ return a; }'), 'function');
-test(eval('typeof function(a = "x1", b = "y1",){ return a + b; }'), 'function');
-test(eval('typeof function(a = "x2", b = "y2", c = "z3"){ return a + b + c; }'), 'function');
-
-test(evalWithThrow('(function(a){ return a; })(,)'), 'SyntaxError: Unexpected token \',\'');
-test(evalWithThrow('(function(a){ return a; })("A",,)'), 'SyntaxError: Unexpected token \',\'');
-test(eval('(function(a){ return a; })("A",)'), 'A');
-test(eval('(function(a, b,){ return a + b; })("A", "B",)'), 'AB');
-test(eval('(function(a, b, c){ return a + b + c; })("A", "B", "C",)'), 'ABC');
-
-test(eval('(function(a){ return arguments.length; })("A",)'), 1);
-test(eval('(function(a, b,){ return arguments.length; })("A", "B",)'), 2);
-test(eval('(function(a, b, c){ return arguments.length; })("A", "B", "C",)'), 3);
-test(eval('(function(a,) { }).length'), 1);
-test(eval('(function(a, b, ) { }).length'), 2);
-test(eval('(function(a, b, c, ) { }).length'), 3);
-
-