| Index: pkg/analyzer/test/generated/parser_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
|
| index 953dc32c85cb1604bdc552c1655e72805f0d4064..334906f94b469ec70b37dfdd31b2d493961b7ffb 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -7405,6 +7405,38 @@ class SimpleParserTest extends ParserTestCase {
|
| JUnitTestCase.assertNotNull(expression.rightOperand);
|
| }
|
|
|
| + void test_parseExpression_function_async() {
|
| + FunctionExpression expression = ParserTestCase.parseExpression("() async {}", []);
|
| + JUnitTestCase.assertNotNull(expression.body);
|
| + JUnitTestCase.assertTrue(expression.body.isAsynchronous);
|
| + JUnitTestCase.assertFalse(expression.body.isGenerator);
|
| + JUnitTestCase.assertNotNull(expression.parameters);
|
| + }
|
| +
|
| + void test_parseExpression_function_asyncStar() {
|
| + FunctionExpression expression = ParserTestCase.parseExpression("() async* {}", []);
|
| + JUnitTestCase.assertNotNull(expression.body);
|
| + JUnitTestCase.assertTrue(expression.body.isAsynchronous);
|
| + JUnitTestCase.assertTrue(expression.body.isGenerator);
|
| + JUnitTestCase.assertNotNull(expression.parameters);
|
| + }
|
| +
|
| + void test_parseExpression_function_sync() {
|
| + FunctionExpression expression = ParserTestCase.parseExpression("() {}", []);
|
| + JUnitTestCase.assertNotNull(expression.body);
|
| + JUnitTestCase.assertFalse(expression.body.isAsynchronous);
|
| + JUnitTestCase.assertFalse(expression.body.isGenerator);
|
| + JUnitTestCase.assertNotNull(expression.parameters);
|
| + }
|
| +
|
| + void test_parseExpression_function_syncStar() {
|
| + FunctionExpression expression = ParserTestCase.parseExpression("() sync* {}", []);
|
| + JUnitTestCase.assertNotNull(expression.body);
|
| + JUnitTestCase.assertFalse(expression.body.isAsynchronous);
|
| + JUnitTestCase.assertTrue(expression.body.isGenerator);
|
| + JUnitTestCase.assertNotNull(expression.parameters);
|
| + }
|
| +
|
| void test_parseExpression_invokeFunctionExpression() {
|
| FunctionExpressionInvocation invocation = ParserTestCase.parse4("parseExpression", "(a) {return a + a;} (3)", []);
|
| EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression, FunctionExpression, invocation.function);
|
| @@ -8104,12 +8136,6 @@ class SimpleParserTest extends ParserTestCase {
|
| JUnitTestCase.assertNull((expression.body as ExpressionFunctionBody).semicolon);
|
| }
|
|
|
| - void test_parseFunctionExpression_minimal() {
|
| - FunctionExpression expression = ParserTestCase.parse4("parseFunctionExpression", "() {}", []);
|
| - JUnitTestCase.assertNotNull(expression.body);
|
| - JUnitTestCase.assertNotNull(expression.parameters);
|
| - }
|
| -
|
| void test_parseGetter_nonStatic() {
|
| Comment comment = Comment.createDocumentationComment(new List<Token>(0));
|
| TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
|
| @@ -11220,6 +11246,22 @@ class SimpleParserTest extends ParserTestCase {
|
| final __test = new SimpleParserTest();
|
| runJUnitTest(__test, __test.test_parseExpression_comparison);
|
| });
|
| + _ut.test('test_parseExpression_function_async', () {
|
| + final __test = new SimpleParserTest();
|
| + runJUnitTest(__test, __test.test_parseExpression_function_async);
|
| + });
|
| + _ut.test('test_parseExpression_function_asyncStar', () {
|
| + final __test = new SimpleParserTest();
|
| + runJUnitTest(__test, __test.test_parseExpression_function_asyncStar);
|
| + });
|
| + _ut.test('test_parseExpression_function_sync', () {
|
| + final __test = new SimpleParserTest();
|
| + runJUnitTest(__test, __test.test_parseExpression_function_sync);
|
| + });
|
| + _ut.test('test_parseExpression_function_syncStar', () {
|
| + final __test = new SimpleParserTest();
|
| + runJUnitTest(__test, __test.test_parseExpression_function_syncStar);
|
| + });
|
| _ut.test('test_parseExpression_invokeFunctionExpression', () {
|
| final __test = new SimpleParserTest();
|
| runJUnitTest(__test, __test.test_parseExpression_invokeFunctionExpression);
|
| @@ -11472,10 +11514,6 @@ class SimpleParserTest extends ParserTestCase {
|
| final __test = new SimpleParserTest();
|
| runJUnitTest(__test, __test.test_parseFunctionExpression_body_inExpression);
|
| });
|
| - _ut.test('test_parseFunctionExpression_minimal', () {
|
| - final __test = new SimpleParserTest();
|
| - runJUnitTest(__test, __test.test_parseFunctionExpression_minimal);
|
| - });
|
| _ut.test('test_parseGetter_nonStatic', () {
|
| final __test = new SimpleParserTest();
|
| runJUnitTest(__test, __test.test_parseGetter_nonStatic);
|
|
|