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

Unified Diff: tests/lib/convert/codec1_test.dart

Issue 22979003: add a const ctor to Converter (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated tests Created 7 years, 4 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/convert/converter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/convert/codec1_test.dart
diff --git a/tests/lib/convert/codec1_test.dart b/tests/lib/convert/codec1_test.dart
index 6132c9616b87ef7db401a6b8e5f96c09a425b4ce..5b5d9b3bf08d1621d8644a45307c878a46bf7a68 100644
--- a/tests/lib/convert/codec1_test.dart
+++ b/tests/lib/convert/codec1_test.dart
@@ -9,15 +9,19 @@ import 'package:expect/expect.dart';
class MyCodec extends Codec<int, String> {
const MyCodec();
- Converter<int, String> get encoder => new IntStringConverter();
- Converter<String, int> get decoder => new StringIntConverter();
+ final Converter<int, String> encoder = const IntStringConverter();
+ final Converter<String, int> decoder = const StringIntConverter();
}
class IntStringConverter extends Converter<int, String> {
+ const IntStringConverter();
+
String convert(int i) => i.toString();
}
class StringIntConverter extends Converter<String, int> {
+ const StringIntConverter();
+
int convert(String str) => int.parse(str);
}
« no previous file with comments | « sdk/lib/convert/converter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698