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

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

Issue 1616023002: Add named arguments support into constant ASTs. (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 ee0ab8bac6d8eb0288c65cf374d2fff3ab5cc8e8..a3f04c43b527bc50f8fcbbe64188c636ffba3578 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -1444,6 +1444,7 @@ const v = const C.named();
_assertUnlinkedConst(variable.constExpr, operators: [
UnlinkedConstOperation.invokeConstructor,
], ints: [
+ 0,
0
], strings: [
'named'
@@ -1472,6 +1473,7 @@ const v = const C.named();
_assertUnlinkedConst(variable.constExpr, operators: [
UnlinkedConstOperation.invokeConstructor,
], ints: [
+ 0,
0
], strings: [
'named'
@@ -1496,6 +1498,7 @@ const v = const p.C.named();
_assertUnlinkedConst(variable.constExpr, operators: [
UnlinkedConstOperation.invokeConstructor,
], ints: [
+ 0,
0
], strings: [
'named'
@@ -1508,19 +1511,38 @@ const v = const p.C.named();
test_constExpr_invokeConstructor_unnamed() {
UnlinkedVariable variable = serializeVariableText('''
class C {
- const C(int a, String b);
+ const C(a, b, c, d, {e, f, g});
}
-const v = const C(42, 'sss');
+const v = const C(11, 22, 3.3, '444', e: 55, g: '777', f: 66);
''');
+ // Stack: 11 22 3.3 '444' 55 '777' 66 ^head
+ // Ints: ^pointer 3 4
+ // Doubles: ^pointer
+ // Strings: ^pointer 'e' 'g' 'f' ''
_assertUnlinkedConst(variable.constExpr, operators: [
UnlinkedConstOperation.pushInt,
+ UnlinkedConstOperation.pushInt,
+ UnlinkedConstOperation.pushDouble,
+ UnlinkedConstOperation.pushString,
+ UnlinkedConstOperation.pushInt,
UnlinkedConstOperation.pushString,
+ UnlinkedConstOperation.pushInt,
UnlinkedConstOperation.invokeConstructor,
], ints: [
- 42,
- 2
+ 11,
+ 22,
+ 55,
+ 66,
+ 3,
+ 4,
+ ], doubles: [
+ 3.3
], strings: [
- 'sss',
+ '444',
+ '777',
+ 'e',
+ 'g',
+ 'f',
''
], referenceValidators: [
(TypeRef r) => checkTypeRef(r, null, null, 'C',
« 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