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

Unified Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 2514353005: Add support for "??" to summaries. (Closed)
Patch Set: Created 4 years, 1 month 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: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 018d86d08347053af1d0df49d02942819a4b2197..1a08a05eb7620f1adb8434aa7a0346a245ce4245 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -1756,6 +1756,18 @@ var v = (() {
]);
}
+ test_constExpr_binary_qq() {
+ UnlinkedVariable variable = serializeVariableText('const v = 1 ?? 2;');
+ _assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+ UnlinkedExprOperation.pushInt,
+ UnlinkedExprOperation.pushInt,
+ UnlinkedExprOperation.ifNull
+ ], ints: [
+ 1,
+ 2
+ ]);
+ }
+
test_constExpr_binary_subtract() {
UnlinkedVariable variable = serializeVariableText('const v = 1 - 2;');
_assertUnlinkedConst(variable.initializer.bodyExpr, operators: [

Powered by Google App Engine
This is Rietveld 408576698