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

Unified Diff: tests/language/closure7_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/closure7_test.dart
===================================================================
--- tests/language/closure7_test.dart (revision 12414)
+++ tests/language/closure7_test.dart (working copy)
@@ -7,12 +7,12 @@
class A {
foo() => 499;
fooo() => 4999; // Implicit closure class can be shared with foo.
- bar(x, [y = 8, z = 10]) => "1 $x $y $z";
- gee(x, [y = 9, z = 11]) => "2 $x $y $z"; // Must not be shared with "bar".
- toto(x, [y = 8, z = 10]) => "3 $x $y $z"; // Could be shared with "bar".
+ bar(x, {y: 8, z: 10}) => "1 $x $y $z";
+ gee(x, {y: 9, z: 11}) => "2 $x $y $z"; // Must not be shared with "bar".
+ toto(x, {y: 8, z: 10}) => "3 $x $y $z"; // Could be shared with "bar".
- fisk(x, [y = 8, zz = 10]) => "4 $x $y $zz";
- titi(x, [y = 8, zz = 77]) => "5 $x $y $zz"; // Could be shared with "fisk",
+ fisk(x, {y: 8, zz: 10}) => "4 $x $y $zz";
+ titi(x, {y: 8, zz: 77}) => "5 $x $y $zz"; // Could be shared with "fisk",
// because default-val is never used.
}
@@ -21,11 +21,11 @@
// of A.
foo() => 4990;
fooo() => 49990;
- bar(x, [y = 8, z = 10]) => "1B $x $y $z";
- gee(x, [y = 9, z = 11]) => "2B $x $y $z";
- toto(x, [y = 8, z = 10]) => "3B $x $y $z";
- fisk(x, [y = 8, zz = 10]) => "4B $x $y $zz";
- titi(x, [y = 8, zz = 77]) => "5B $x $y $zz";
+ bar(x, {y: 8, z: 10}) => "1B $x $y $z";
+ gee(x, {y: 9, z: 11}) => "2B $x $y $z";
+ toto(x, {y: 8, z: 10}) => "3B $x $y $z";
+ fisk(x, {y: 8, zz: 10}) => "4B $x $y $zz";
+ titi(x, {y: 8, zz: 77}) => "5B $x $y $zz";
}
@@ -89,8 +89,8 @@
Expect.equals("5 311 8 987", titiA(311, zz: 987));
Expect.equals("5B 311 8 987", titiB(311, zz: 987));
- Expect.equals("4 311 765 987", fiskA(311, 765, 987));
- Expect.equals("4B 311 765 987", fiskB(311, 765, 987));
- Expect.equals("5 311 765 987", titiA(311, 765, 987));
- Expect.equals("5B 311 765 987", titiB(311, 765, 987));
+ Expect.equals("4 311 765 987", fiskA(311, y: 765, zz: 987));
+ Expect.equals("4B 311 765 987", fiskB(311, y: 765, zz: 987));
+ Expect.equals("5 311 765 987", titiA(311, y: 765, zz: 987));
+ Expect.equals("5B 311 765 987", titiB(311, y: 765, zz: 987));
}

Powered by Google App Engine
This is Rietveld 408576698