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

Unified Diff: tests/language/constructor_named_arguments_test.dart

Issue 10918261: Update language tests to new optional parameter syntax and semantics. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/constructor_named_arguments_test.dart
===================================================================
--- tests/language/constructor_named_arguments_test.dart (revision 12414)
+++ tests/language/constructor_named_arguments_test.dart (working copy)
@@ -18,13 +18,13 @@
class X {
var i;
var j;
- X([a = 'defa', b = 'defb']) : this.i = a, this.j = b;
+ X({a: 'defa', b: 'defb'}) : this.i = a, this.j = b;
X.foo() : this(b: 1, a: 2);
X.bar() : this(
1, /// 01: runtime error
a: 2);
X.baz() : this(a: 1, b: 2);
- X.qux() : this(1, 2);
+ X.qux() : this(b: 2);
X.hest() : this();
X.fisk() : this(b: bar(), a: foo());
X.naebdyr() : this(a: foo(), b: bar());
@@ -39,7 +39,7 @@
test(new X.foo(), 2, 1);
test(new X.bar(), 2, 'defb');
test(new X.baz(), 1, 2);
- test(new X.qux(), 1, 2);
+ test(new X.qux(), 'defa', 2);
test(new X.hest(), 'defa', 'defb');
message = '';

Powered by Google App Engine
This is Rietveld 408576698