Changeset 195461 in webkit
- Timestamp:
- Jan 22, 2016 10:47:38 AM (8 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r195460 r195461 1 2016-01-22 Skachkov Oleksandr <gskachkov@gmail.com> 2 3 [ES6] Arrow function. Default arguments in arrow functions 4 https://bugs.webkit.org/show_bug.cgi?id=152537 5 6 Reviewed by Saam Barati. 7 8 Default arguments in arrow function parameters have been already 9 implemented by patch from issue https://bugs.webkit.org/show_bug.cgi?id=146934. 10 Current patch adds only tests for this feature 11 12 * js/arrowfunction-syntax-expected.txt: 13 * js/script-tests/arrowfunction-syntax.js: 14 1 15 2016-01-22 Keith Miller <keith_miller@apple.com> 2 16 -
trunk/LayoutTests/js/arrowfunction-syntax-expected.txt
r195178 r195461 49 49 PASS ((x, y, {c:b, d:a}, [e, f]) => x + y + a + b + e + f)("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"]) is "x_y_b_a_e_f_" 50 50 PASS ((x, y, {c:b, d:a}, [e, f], ...theArgs) => x + y + a + b + e + f + theArgs[0] + theArgs[1])("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_") is "x_y_b_a_e_f_g_h_" 51 PASS ((x, y = 'default-value') => x + y)('input-value:') is "input-value:default-value" 52 PASS ((x, y = 'default-value') => x + y)('input-value:', undefined) is "input-value:default-value" 53 PASS ((x, y = 'default-value') => x + y)() is "undefineddefault-value" 54 PASS ((x, y = 'default-value') => x + y)('input-value-1:','input-value-2') is "input-value-1:input-value-2" 51 55 PASS arr1(["a_", "b_"]) is "a_b_" 52 56 PASS arr2({a:"a_", b:"b_"}) is "a_b_" … … 57 61 PASS arr7("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"]) is "x_y_b_a_e_f_" 58 62 PASS arr8("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_") is "x_y_b_a_e_f_g_h_" 63 PASS arr9("input-value:") is "input-value:default-value" 64 PASS arr9("input-value:", undefined) is "input-value:default-value" 65 PASS arr9() is "undefineddefault-value" 66 PASS arr9("input-value-1:", "input-value-2") is "input-value-1:input-value-2" 59 67 PASS successfullyParsed is true 60 68 -
trunk/LayoutTests/js/script-tests/arrowfunction-syntax.js
r195178 r195461 88 88 shouldBe('((x, y, {c:b, d:a}, [e, f]) => x + y + a + b + e + f)("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"])', '"x_y_b_a_e_f_"'); 89 89 shouldBe('((x, y, {c:b, d:a}, [e, f], ...theArgs) => x + y + a + b + e + f + theArgs[0] + theArgs[1])("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_")', '"x_y_b_a_e_f_g_h_"'); 90 shouldBe("((x, y = 'default-value') => x + y)('input-value:')",'"input-value:default-value"'); 91 shouldBe("((x, y = 'default-value') => x + y)('input-value:', undefined)",'"input-value:default-value"'); 92 shouldBe("((x, y = 'default-value') => x + y)()",'"undefineddefault-value"'); 93 shouldBe("((x, y = 'default-value') => x + y)('input-value-1:','input-value-2')",'"input-value-1:input-value-2"'); 90 94 91 95 var arr1 = ([a, b]) => a + b; … … 113 117 shouldBe('arr8("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_")', '"x_y_b_a_e_f_g_h_"'); 114 118 119 var arr9 = (x, y = 'default-value') => x + y; 120 shouldBe('arr9("input-value:")','"input-value:default-value"'); 121 shouldBe('arr9("input-value:", undefined)','"input-value:default-value"'); 122 shouldBe('arr9()','"undefineddefault-value"'); 123 shouldBe('arr9("input-value-1:", "input-value-2")','"input-value-1:input-value-2"'); 124 115 125 var successfullyParsed = true;
Note: See TracChangeset
for help on using the changeset viewer.