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

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

Issue 535543003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/lib/src/generated/resolver.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 334906f94b469ec70b37dfdd31b2d493961b7ffb..23e4ff664296352ea6f82cdf4fe2030383ef8682 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -5825,6 +5825,18 @@ class SimpleParserTest extends ParserTestCase {
EngineTestCase.assertInstanceOf((obj) => obj is VariableDeclarationStatement, VariableDeclarationStatement, statement);
}
+ void test_parseAwaitExpression_inSync() {
+ MethodDeclaration method = ParserTestCase.parse("parseClassMember", <Object> ["C"], EngineTestCase.createSource(["m() { return await x + await y; }"]));
+ FunctionBody body = method.body;
+ EngineTestCase.assertInstanceOf((obj) => obj is BlockFunctionBody, BlockFunctionBody, body);
+ Statement statement = (body as BlockFunctionBody).block.statements[0];
+ EngineTestCase.assertInstanceOf((obj) => obj is ReturnStatement, ReturnStatement, statement);
+ Expression expression = (statement as ReturnStatement).expression;
+ EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression, BinaryExpression, expression);
+ EngineTestCase.assertInstanceOf((obj) => obj is AwaitExpression, AwaitExpression, (expression as BinaryExpression).leftOperand);
+ EngineTestCase.assertInstanceOf((obj) => obj is AwaitExpression, AwaitExpression, (expression as BinaryExpression).rightOperand);
+ }
+
void test_parseBitwiseAndExpression_normal() {
BinaryExpression expression = ParserTestCase.parse4("parseBitwiseAndExpression", "x & y", []);
JUnitTestCase.assertNotNull(expression.leftOperand);
@@ -10542,6 +10554,10 @@ class SimpleParserTest extends ParserTestCase {
final __test = new SimpleParserTest();
runJUnitTest(__test, __test.test_parseAwaitExpression_asStatement_inSync);
});
+ _ut.test('test_parseAwaitExpression_inSync', () {
+ final __test = new SimpleParserTest();
+ runJUnitTest(__test, __test.test_parseAwaitExpression_inSync);
+ });
_ut.test('test_parseBitwiseAndExpression_normal', () {
final __test = new SimpleParserTest();
runJUnitTest(__test, __test.test_parseBitwiseAndExpression_normal);
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698