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

Unified Diff: tests/compiler/dart2js/parser_test.dart

Issue 1562023002: Add test of unittests. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 4 years, 11 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
Index: tests/compiler/dart2js/parser_test.dart
diff --git a/tests/compiler/dart2js/parser_test.dart b/tests/compiler/dart2js/parser_test.dart
index 4674201868bcb50e045d9a1cb0017d94bc0e6017..2ee3d9e729cd2d0c2a6796c5f55af5b2ddf15616 100644
--- a/tests/compiler/dart2js/parser_test.dart
+++ b/tests/compiler/dart2js/parser_test.dart
@@ -155,19 +155,23 @@ void testConditionalExpression() {
}
void testNullOperators() {
- Expression node = parseStatement("a ?? b;").expression;
+ ExpressionStatement statement = parseStatement("a ?? b;");
+ Expression node = statement.expression;
Expect.isNotNull(node.asSend());
Expect.isTrue(node.asSend().isIfNull);
- node = parseStatement("a ??= b;").expression;
+ statement = parseStatement("a ??= b;");
+ node = statement.expression;
Expect.isNotNull(node.asSendSet());
Expect.isTrue(node.asSendSet().isIfNullAssignment);
- node = parseStatement("a?.b;").expression;
+ statement = parseStatement("a?.b;");
+ node = statement.expression;
Expect.isNotNull(node.asSend());
Expect.isTrue(node.asSend().isConditional);
- node = parseStatement("a?.m();").expression;
+ statement = parseStatement("a?.m();");
+ node = statement.expression;
Expect.isNotNull(node.asSend());
Expect.isTrue(node.asSend().isConditional);
}

Powered by Google App Engine
This is Rietveld 408576698