Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2361433002: Async is no longer optional (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/package_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cfea45d3ca505da02faf4edbe3630d9d2542e309..d979ed32bf8d1bf713f23bdaf0aaad38d7a4f495 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -1041,42 +1041,6 @@ class ErrorParserTest extends ParserTestCase {
listener.assertErrorsWithCodes([ParserErrorCode.EMPTY_ENUM_BODY]);
}
- void test_enableAsync_false_1() {
- parseAsync = false;
- createParser('foo() async {}');
- FunctionDeclarationStatement statement =
- parser.parseFunctionDeclarationStatement();
- expectNotNullIfNoErrors(statement);
- listener.assertErrorsWithCodes([ParserErrorCode.ASYNC_NOT_SUPPORTED]);
- FunctionExpression expr = statement.functionDeclaration.functionExpression;
- expect(expr.body.isAsynchronous, isTrue);
- expect(expr.body.isGenerator, isFalse);
- }
-
- void test_enableAsync_false_2() {
- parseAsync = false;
- createParser('foo() async => 0;');
- FunctionDeclarationStatement statement =
- parser.parseFunctionDeclarationStatement();
- expectNotNullIfNoErrors(statement);
- listener.assertErrorsWithCodes([ParserErrorCode.ASYNC_NOT_SUPPORTED]);
- FunctionExpression expr = statement.functionDeclaration.functionExpression;
- expect(expr.body.isAsynchronous, isTrue);
- expect(expr.body.isGenerator, isFalse);
- }
-
- void test_enableAsync_false_3() {
- parseAsync = false;
- createParser('foo() sync* {}');
- FunctionDeclarationStatement statement =
- parser.parseFunctionDeclarationStatement();
- expectNotNullIfNoErrors(statement);
- listener.assertErrorsWithCodes([ParserErrorCode.ASYNC_NOT_SUPPORTED]);
- FunctionExpression expr = statement.functionDeclaration.functionExpression;
- expect(expr.body.isAsynchronous, isFalse);
- expect(expr.body.isGenerator, isTrue);
- }
-
void test_enumInClass() {
ParserTestCase.parseCompilationUnit(
r'''
« no previous file with comments | « pkg/analyzer/test/generated/package_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698