Title: [201745] trunk/Source/_javascript_Core
Revision
201745
Author
[email protected]
Date
2016-06-06 23:33:30 -0700 (Mon, 06 Jun 2016)

Log Message

Fix typo in test name trailing-comma-in-function-paramters.js
https://bugs.webkit.org/show_bug.cgi?id=158462

Patch by Joseph Pecoraro <[email protected]> on 2016-06-06
Reviewed by Mark Lam.

* tests/stress/trailing-comma-in-function-parameters.js: Renamed from Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (201744 => 201745)


--- trunk/Source/_javascript_Core/ChangeLog	2016-06-07 06:32:32 UTC (rev 201744)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-06-07 06:33:30 UTC (rev 201745)
@@ -1,3 +1,12 @@
+2016-06-06  Joseph Pecoraro  <[email protected]>
+
+        Fix typo in test name trailing-comma-in-function-paramters.js
+        https://bugs.webkit.org/show_bug.cgi?id=158462
+
+        Reviewed by Mark Lam.
+
+        * tests/stress/trailing-comma-in-function-parameters.js: Renamed from Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js.
+
 2016-06-06  Andreas Kling  <[email protected]>
 
         REGRESSION(r197595): 2% JSBench regression on iPhone 5.

Copied: trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-parameters.js (from rev 201744, trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js) (0 => 201745)


--- trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-parameters.js	                        (rev 0)
+++ trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-parameters.js	2016-06-07 06:33:30 UTC (rev 201745)
@@ -0,0 +1,63 @@
+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);
+
+

Deleted: trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js (201744 => 201745)


--- trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js	2016-06-07 06:32:32 UTC (rev 201744)
+++ trunk/Source/_javascript_Core/tests/stress/trailing-comma-in-function-paramters.js	2016-06-07 06:33:30 UTC (rev 201745)
@@ -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);
-
-
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to