Chromium Code Reviews| Index: pkg/intl/test/intl_test.dart |
| =================================================================== |
| --- pkg/intl/test/intl_test.dart (revision 12224) |
| +++ pkg/intl/test/intl_test.dart (working copy) |
| @@ -5,17 +5,30 @@ |
| #library('intl_test'); |
| #import('../intl.dart'); |
| -#import('../../../pkg/unittest/unittest.dart'); |
| +#import('../../unittest/unittest.dart'); |
| #import('../date_symbol_data_local.dart'); |
| +#import('../message_lookup_local.dart'); |
|
Emily Fortuna
2012/09/12 01:23:48
seems odd that we have to import message_lookup_lo
Alan Knight
2012/09/12 20:58:20
Good point. At one point I'd put code in there tha
|
| main() { |
| - test('Set locale', (){ |
| + initializeMessages('en_US').then(runTheTests); |
| +} |
| + |
| +runTheTests(_) { |
| + |
| + test("Locale setting doesn't verify the core locale", () { |
| + var de = new Intl('de_DE'); |
| + expect(de.locale, equals('de_DE')); |
| + }); |
| + |
| + test('DateFormat creation does verify the locale', (){ |
| // TODO(alanknight): We need to make the locale verification be on a per |
| // usage basis rather than once for the entire Intl object. The set of |
| // locales covered for messages may be different from that for date |
| // formatting. |
| initializeDateFormatting('de_DE', null).then((_) { |
| var de = new Intl('de_DE'); |
| - expect(de.locale, equals('de'));}); |
| + var format = de.date().add_d(); |
| + expect(format.locale, equals('de')); |
| + }); |
| }); |
| } |