From 4941d46a280cd475ee7918230e9ac369980e5d0f Mon Sep 17 00:00:00 2001 From: Leo Balter <leonardo.balter@gmail.com> Date: Thu, 6 Apr 2017 16:05:05 -0400 Subject: [PATCH] Update cases for async fns with a line terminator --- ...ator.js => async-lineterminator-identifier-throws.js} | 9 ++++----- .../early-errors-arrow-formals-lineterminator.js | 2 +- .../early-errors-object-method-async-lineterminator.js | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) rename test/language/expressions/async-arrow-function/{early-errors-arrow-ident-lineterminator.js => async-lineterminator-identifier-throws.js} (79%) diff --git a/test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js b/test/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js similarity index 79% rename from test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js rename to test/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js index 9905be53a3..9ce0ef5b00 100644 --- a/test/language/expressions/async-arrow-function/early-errors-arrow-ident-lineterminator.js +++ b/test/language/expressions/async-arrow-function/async-lineterminator-identifier-throws.js @@ -4,10 +4,9 @@ /*--- esid: prod-AsyncArrowFunction description: async arrows cannot have a line terminator between "async" and the AsyncArrowBindingIdentifier -negative: - phase: early - type: ReferenceError ---*/ -async -foo => { } +assert.throws(ReferenceError, function() { + async + identifier => {} +}); 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 index 3f3c1466c5..d008deca1b 100644 --- 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 @@ -10,4 +10,4 @@ negative: ---*/ async -(foo,bar) => { } +(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 index 3c7fead378..5580ace159 100644 --- 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 @@ -9,7 +9,7 @@ negative: type: SyntaxError ---*/ -{ +!{ async - foo () { } + foo() { } } -- GitLab