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

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

Issue 509073008: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/pubspec.yaml ('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 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);
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698