Bug 1185106 - Part 9.2: Add parser test for async function statement in export default. r=efaust,till
authorTooru Fujisawa <arai_a@mac.com>
Sun, 28 Aug 2016 23:58:29 +0900
changeset 320241 e042b0dba45525afea60180c2851bee4785a1855
parent 320240 0e9b413f34392cd8e1bdda5cb230091a204fb5ef
child 320242 fe120f64b871c96744c63d6530f41f83022511c2
push id20754
push usercbook@mozilla.com
push dateMon, 31 Oct 2016 15:58:35 +0000
treeherderfx-team@b1b66b1780c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust, till
bugs1185106
milestone52.0a1
Bug 1185106 - Part 9.2: Add parser test for async function statement in export default. r=efaust,till MozReview-Commit-ID: U7PXXOsEpA
js/src/jit-test/lib/syntax.js
--- a/js/src/jit-test/lib/syntax.js
+++ b/js/src/jit-test/lib/syntax.js
@@ -1227,16 +1227,30 @@ function test_syntax(postfixes, check_er
   test("async function A(a) { await X; ");
   test("async function A(a) { await X; } ");
   test("async function A(a) { await await ");
   test("async function A(a) { await await await ");
   test("async function A(a) { await await await X ");
   test("async function A(a) { await await await X; ");
   test("async function A(a) { await await await X; } ");
 
+  opts = { no_fun: true, no_eval: true, module: true };
+  test("export default async ", opts);
+  test("export default async function ", opts);
+  test("export default async function ( ", opts);
+  test("export default async function () ", opts);
+  test("export default async function (a ", opts);
+  test("export default async function (a) ", opts);
+  test("export default async function (a) { ", opts);
+  test("export default async function (a) {} ", opts);
+  test("export default async function (a) { await ", opts);
+  test("export default async function (a) { await X ", opts);
+  test("export default async function (a) { await X; ", opts);
+  test("export default async function (a) { await X; } ", opts);
+
   // async/await function expression
 
   test("(async ");
   test("(async function ");
   test("(async function A ");
   test("(async function A( ");
   test("(async function A() ");
   test("(async function A(a ");