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 420eda027bab6a6c825a17806b74b6bc9268caec..e7687198bfb74211c9a6a0df36110a0137229023 100644 |
--- a/pkg/analyzer/test/generated/parser_test.dart |
+++ b/pkg/analyzer/test/generated/parser_test.dart |
@@ -10765,6 +10765,46 @@ class SimpleParserTest extends ParserTestCase with SimpleParserTestMixin { |
expect(reference.offset, 15); |
} |
+ void test_parseFunctionBody_skip_block() { |
+ ParserTestCase.parseFunctionBodies = false; |
+ createParser('{}'); |
+ FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
+ expectNotNullIfNoErrors(functionBody); |
+ listener.assertNoErrors(); |
+ expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
+ } |
+ |
+ void test_parseFunctionBody_skip_block_invalid() { |
+ ParserTestCase.parseFunctionBodies = false; |
+ createParser('{'); |
+ FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
+ expectNotNullIfNoErrors(functionBody); |
+ listener.assertErrorsWithCodes([ |
+ fe.Scanner.useFasta |
+ ? ScannerErrorCode.EXPECTED_TOKEN |
+ : ParserErrorCode.EXPECTED_TOKEN |
+ ]); |
+ expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
+ } |
+ |
+ void test_parseFunctionBody_skip_blocks() { |
+ ParserTestCase.parseFunctionBodies = false; |
+ createParser('{ {} }'); |
+ FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
+ expectNotNullIfNoErrors(functionBody); |
+ listener.assertNoErrors(); |
+ expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
+ } |
+ |
+ void test_parseFunctionBody_skip_expression() { |
+ ParserTestCase.parseFunctionBodies = false; |
+ createParser('=> y;'); |
+ FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
+ expectNotNullIfNoErrors(functionBody); |
+ listener.assertNoErrors(); |
+ expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
+ } |
+ |
void test_Parser() { |
expect(new Parser(null, null), isNotNull); |
} |
@@ -11751,46 +11791,6 @@ abstract class SimpleParserTestMixin implements AbstractParserTestCase { |
expect(body.isSynchronous, isFalse); |
} |
- void test_parseFunctionBody_skip_block() { |
- ParserTestCase.parseFunctionBodies = false; |
- createParser('{}'); |
- FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
- expectNotNullIfNoErrors(functionBody); |
- listener.assertNoErrors(); |
- expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
- } |
- |
- void test_parseFunctionBody_skip_block_invalid() { |
- ParserTestCase.parseFunctionBodies = false; |
- createParser('{'); |
- FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
- expectNotNullIfNoErrors(functionBody); |
- listener.assertErrorsWithCodes([ |
- fe.Scanner.useFasta |
- ? ScannerErrorCode.EXPECTED_TOKEN |
- : ParserErrorCode.EXPECTED_TOKEN |
- ]); |
- expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
- } |
- |
- void test_parseFunctionBody_skip_blocks() { |
- ParserTestCase.parseFunctionBodies = false; |
- createParser('{ {} }'); |
- FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
- expectNotNullIfNoErrors(functionBody); |
- listener.assertNoErrors(); |
- expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
- } |
- |
- void test_parseFunctionBody_skip_expression() { |
- ParserTestCase.parseFunctionBodies = false; |
- createParser('=> y;'); |
- FunctionBody functionBody = parser.parseFunctionBody(false, null, false); |
- expectNotNullIfNoErrors(functionBody); |
- listener.assertNoErrors(); |
- expect(functionBody, new isInstanceOf<EmptyFunctionBody>()); |
- } |
- |
void test_parseIdentifierList_multiple() { |
createParser('a, b, c'); |
List<SimpleIdentifier> list = parser.parseIdentifierList(); |