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

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

Issue 1648783002: Repalce shiftOr with pushLongInt, tweak makeSymbol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_const_expr.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2122771dced4b78f94d81b066130038cd481511c..68bd748df1c53ba8bd38696258e41696674c1c0c 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -1894,12 +1894,8 @@ const int v = p.a.length;
test_constExpr_makeSymbol() {
UnlinkedVariable variable = serializeVariableText('const v = #a.bb.ccc;');
- _assertUnlinkedConst(variable.constExpr, operators: [
- UnlinkedConstOperation.pushString,
- UnlinkedConstOperation.makeSymbol
- ], strings: [
- 'a.bb.ccc'
- ]);
+ _assertUnlinkedConst(variable.constExpr,
+ operators: [UnlinkedConstOperation.makeSymbol], strings: ['a.bb.ccc']);
}
test_constExpr_makeTypedList() {
@@ -2109,45 +2105,25 @@ const int v = p.a.length;
]);
}
- test_constExpr_pushInt_shiftOr_long() {
+ test_constExpr_pushLongInt() {
UnlinkedVariable variable =
serializeVariableText('const v = 0xA123456789ABCDEF012345678;');
- _assertUnlinkedConst(variable.constExpr, operators: [
- UnlinkedConstOperation.pushInt,
- UnlinkedConstOperation.shiftOr,
- UnlinkedConstOperation.shiftOr,
- UnlinkedConstOperation.shiftOr
- ], ints: [
- 0xA,
- 0x12345678,
- 0x9ABCDEF0,
- 0x12345678
- ]);
+ _assertUnlinkedConst(variable.constExpr,
+ operators: [UnlinkedConstOperation.pushLongInt],
+ ints: [4, 0xA, 0x12345678, 0x9ABCDEF0, 0x12345678]);
}
- test_constExpr_pushInt_shiftOr_min() {
+ test_constExpr_pushLongInt_min2() {
UnlinkedVariable variable = serializeVariableText('const v = 0x100000000;');
- _assertUnlinkedConst(variable.constExpr, operators: [
- UnlinkedConstOperation.pushInt,
- UnlinkedConstOperation.shiftOr,
- ], ints: [
- 1,
- 0,
- ]);
+ _assertUnlinkedConst(variable.constExpr,
+ operators: [UnlinkedConstOperation.pushLongInt], ints: [2, 1, 0,]);
}
- test_constExpr_pushInt_shiftOr_min2() {
+ test_constExpr_pushLongInt_min3() {
UnlinkedVariable variable =
serializeVariableText('const v = 0x10000000000000000;');
- _assertUnlinkedConst(variable.constExpr, operators: [
- UnlinkedConstOperation.pushInt,
- UnlinkedConstOperation.shiftOr,
- UnlinkedConstOperation.shiftOr,
- ], ints: [
- 1,
- 0,
- 0,
- ]);
+ _assertUnlinkedConst(variable.constExpr,
+ operators: [UnlinkedConstOperation.pushLongInt], ints: [3, 1, 0, 0,]);
}
test_constExpr_pushNull() {
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_const_expr.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698