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

Unified Diff: tests/language/named_parameters_passing_zero_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/named_parameters_passing_zero_test.dart
===================================================================
--- tests/language/named_parameters_passing_zero_test.dart (revision 12414)
+++ tests/language/named_parameters_passing_zero_test.dart (working copy)
@@ -10,31 +10,37 @@
TestClass();
num method([num value = 100]) => value;
+ num method2({num value: 100}) => value;
static num staticMethod([num value = 200]) => value;
+ static num staticMethod2({num value: 200}) => value;
}
num globalMethod([num value = 300]) => value;
+num globalMethod2({num value: 300}) => value;
main() {
var obj = new TestClass();
Expect.equals(100, obj.method());
+ Expect.equals(100, obj.method2());
Expect.equals(7, obj.method(7));
- Expect.equals(7, obj.method(value: 7));
+ Expect.equals(7, obj.method2(value: 7));
Expect.equals(0, obj.method(0));
- Expect.equals(0, obj.method(value: 0));
+ Expect.equals(0, obj.method2(value: 0));
Expect.equals(200, TestClass.staticMethod());
+ Expect.equals(200, TestClass.staticMethod2());
Expect.equals(7, TestClass.staticMethod(7));
- Expect.equals(7, TestClass.staticMethod(value: 7));
+ Expect.equals(7, TestClass.staticMethod2(value: 7));
Expect.equals(0, TestClass.staticMethod(0));
- Expect.equals(0, TestClass.staticMethod(value: 0));
+ Expect.equals(0, TestClass.staticMethod2(value: 0));
Expect.equals(300, globalMethod());
+ Expect.equals(300, globalMethod2());
Expect.equals(7, globalMethod(7));
- Expect.equals(7, globalMethod(value: 7));
+ Expect.equals(7, globalMethod2(value: 7));
Expect.equals(0, globalMethod(0));
- Expect.equals(0, globalMethod(value: 0));
+ Expect.equals(0, globalMethod2(value: 0));
}

Powered by Google App Engine
This is Rietveld 408576698