From 50387544629756d8f1368dca5b885adbea58c1b0 Mon Sep 17 00:00:00 2001
From: Shu-yu Guo <shu@rfrn.org>
Date: Thu, 9 Mar 2017 14:25:35 -0800
Subject: [PATCH] Test for [no LineTerminator here] after 'async' for arrows
 and methods

---
 .../early-errors-arrow-formals-lineterminator.js  | 13 +++++++++++++
 .../early-errors-arrow-ident-lineterminator.js    | 13 +++++++++++++
 ...y-errors-object-method-async-lineterminator.js | 15 +++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 test/language/expressions/async-arrow-function/early-errors-arrow-formals-lineterminator.js
 create mode 100644 test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js
 create mode 100644 test/language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js

diff --git a/test/language/expressions/async-arrow-function/early-errors-arrow-formals-lineterminator.js b/test/language/expressions/async-arrow-function/early-errors-arrow-formals-lineterminator.js
new file mode 100644
index 0000000000..3f3c1466c5
--- /dev/null
+++ b/test/language/expressions/async-arrow-function/early-errors-arrow-formals-lineterminator.js
@@ -0,0 +1,13 @@
+// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-AsyncArrowHead
+description: async arrows cannot have a line terminator between "async" and the formals
+negative:
+  phase: early
+  type: SyntaxError
+---*/
+
+async
+(foo,bar) => { }
diff --git a/test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js b/test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js
new file mode 100644
index 0000000000..9905be53a3
--- /dev/null
+++ b/test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js
@@ -0,0 +1,13 @@
+// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-AsyncArrowFunction
+description: async arrows cannot have a line terminator between "async" and the AsyncArrowBindingIdentifier
+negative:
+  phase: early
+  type: ReferenceError
+---*/
+
+async
+foo => { }
diff --git a/test/language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js b/test/language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js
new file mode 100644
index 0000000000..3c7fead378
--- /dev/null
+++ b/test/language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js
@@ -0,0 +1,15 @@
+// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: prod-AsyncMethod
+description: async methods cannot have a line terminator between "async" and the property name
+negative:
+  phase: early
+  type: SyntaxError
+---*/
+
+{
+  async
+  foo () { }
+}
-- 
GitLab