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

Unified Diff: tests/corelib/apply2_test.dart

Issue 163773003: Emit named parameter information in declaration order. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix bug and add regression test. Created 6 years, 10 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 | « sdk/lib/_internal/lib/js_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/apply2_test.dart
diff --git a/tests/corelib/apply2_test.dart b/tests/corelib/apply2_test.dart
index f2984bffd73a3e1ab4fb5166c569069d9cf3b8ee..021f415edca7eac78179ae6000ddadeb18f92724 100644
--- a/tests/corelib/apply2_test.dart
+++ b/tests/corelib/apply2_test.dart
@@ -29,6 +29,7 @@ main() {
var c4 = ({a: 1}) => 'c4 $a';
var c5 = ({a: 1, b: 2}) => 'c5 $a $b';
var c6 = ({b: 1, a: 2}) => 'c6 $a $b';
+ var c7 = (x, {b: 1, a: 2}) => 'c7 $x $a $b';
Expect.equals('c1', apply(c1, new ArgumentDescriptor(null, null)));
Expect.equals('c1', apply(c1, new ArgumentDescriptor([], null)));
@@ -87,4 +88,18 @@ main() {
throwsNSME(() => apply(c6, new ArgumentDescriptor([1], {})));
throwsNSME(() =>
apply(c6, new ArgumentDescriptor([], {'a': 1, 'b': 2, 'c': 3})));
+
+ Expect.equals('c7 7 2 1', apply(c7, new ArgumentDescriptor([7], null)));
+ Expect.equals('c7 7 3 1', apply(c7, new ArgumentDescriptor([7], {'a': 3})));
+ Expect.equals('c7 7 2 1', apply(c7, new ArgumentDescriptor([7], {})));
+ Expect.equals('c7 7 3 4',
+ apply(c7, new ArgumentDescriptor([7], {'a': 3, 'b': 4})));
+ Expect.equals('c7 7 4 3',
+ apply(c7, new ArgumentDescriptor([7], {'b': 3, 'a': 4})));
+ Expect.equals('c7 7 2 3',
+ apply(c7, new ArgumentDescriptor([7], {'b': 3})));
+ throwsNSME(() => apply(c7, new ArgumentDescriptor([], {'a': 1})));
+ throwsNSME(() => apply(c7, new ArgumentDescriptor([], {})));
+ throwsNSME(() =>
+ apply(c7, new ArgumentDescriptor([7], {'a': 1, 'b': 2, 'c': 3})));
}
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698