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

Side by Side Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 2514353005: Add support for "??" to summaries. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.src.summary.summary_common; 5 library analyzer.test.src.summary.summary_common;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/error/listener.dart'; 9 import 'package:analyzer/error/listener.dart';
10 import 'package:analyzer/src/dart/scanner/reader.dart'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 test_constExpr_binary_or() { 1749 test_constExpr_binary_or() {
1750 UnlinkedVariable variable = 1750 UnlinkedVariable variable =
1751 serializeVariableText('const v = false || true;'); 1751 serializeVariableText('const v = false || true;');
1752 _assertUnlinkedConst(variable.initializer.bodyExpr, operators: [ 1752 _assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
1753 UnlinkedExprOperation.pushFalse, 1753 UnlinkedExprOperation.pushFalse,
1754 UnlinkedExprOperation.pushTrue, 1754 UnlinkedExprOperation.pushTrue,
1755 UnlinkedExprOperation.or 1755 UnlinkedExprOperation.or
1756 ]); 1756 ]);
1757 } 1757 }
1758 1758
1759 test_constExpr_binary_qq() {
1760 UnlinkedVariable variable = serializeVariableText('const v = 1 ?? 2;');
1761 _assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
1762 UnlinkedExprOperation.pushInt,
1763 UnlinkedExprOperation.pushInt,
1764 UnlinkedExprOperation.ifNull
1765 ], ints: [
1766 1,
1767 2
1768 ]);
1769 }
1770
1759 test_constExpr_binary_subtract() { 1771 test_constExpr_binary_subtract() {
1760 UnlinkedVariable variable = serializeVariableText('const v = 1 - 2;'); 1772 UnlinkedVariable variable = serializeVariableText('const v = 1 - 2;');
1761 _assertUnlinkedConst(variable.initializer.bodyExpr, operators: [ 1773 _assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
1762 UnlinkedExprOperation.pushInt, 1774 UnlinkedExprOperation.pushInt,
1763 UnlinkedExprOperation.pushInt, 1775 UnlinkedExprOperation.pushInt,
1764 UnlinkedExprOperation.subtract 1776 UnlinkedExprOperation.subtract
1765 ], ints: [ 1777 ], ints: [
1766 1, 1778 1,
1767 2 1779 2
1768 ]); 1780 ]);
(...skipping 8592 matching lines...) Expand 10 before | Expand all | Expand 10 after
10361 class _PrefixExpectation { 10373 class _PrefixExpectation {
10362 final ReferenceKind kind; 10374 final ReferenceKind kind;
10363 final String name; 10375 final String name;
10364 final String absoluteUri; 10376 final String absoluteUri;
10365 final String relativeUri; 10377 final String relativeUri;
10366 final int numTypeParameters; 10378 final int numTypeParameters;
10367 10379
10368 _PrefixExpectation(this.kind, this.name, 10380 _PrefixExpectation(this.kind, this.name,
10369 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); 10381 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0});
10370 } 10382 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698