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

Unified Diff: tests/language/call_operator_test.dart

Issue 11191043: Third round of cleanups for new optional parameter semantics. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
Index: tests/language/call_operator_test.dart
===================================================================
--- tests/language/call_operator_test.dart (revision 13762)
+++ tests/language/call_operator_test.dart (working copy)
@@ -29,7 +29,7 @@
// Non-trivial method body combination of positional and named.
class E {
- String call(String str, [int count=1]) {
+ String call(String str, {int count: 1}) {
StringBuffer buffer = new StringBuffer();
for (var i = 0; i < count; i++) {
buffer.add(str);
@@ -61,16 +61,16 @@
var d = new D();
Expect.equals(42, d());
Expect.equals(7, d(1));
- Expect.equals(14, d(arg:2));
+ Expect.equals(14, d(2));
Expect.equals(42, d.call());
Expect.equals(7, d.call(1));
- Expect.equals(14, d.call(arg:2));
+ Expect.equals(14, d.call(2));
var e = new E();
Expect.equals("foo", e("foo"));
- Expect.equals("foo:foo", e("foo", 2));
+ Expect.equals("foo:foo", e("foo", count:2));
Expect.equals("foo:foo:foo", e("foo", count:3));
Expect.equals("foo", e.call("foo"));
- Expect.equals("foo:foo", e.call("foo", 2));
+ Expect.equals("foo:foo", e.call("foo", count:2));
Expect.equals("foo:foo:foo", e.call("foo", count:3));
}

Powered by Google App Engine
This is Rietveld 408576698