| Index: tests/lib/i18n/intl_message_test.dart
|
| ===================================================================
|
| --- tests/lib/i18n/intl_message_test.dart (revision 8354)
|
| +++ tests/lib/i18n/intl_message_test.dart (working copy)
|
| @@ -1,12 +1,12 @@
|
| -/**
|
| - * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| - * for details. All rights reserved. Use of this source code is governed by a
|
| - * BSD-style license that can be found in the LICENSE file.
|
| - */
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
|
|
| -#library('message_format_test');
|
|
|
| -#import('../../../lib/i18n/message_format.dart');
|
| +#library('intl_message_test');
|
| +
|
| +#import('../../../lib/i18n/intl.dart');
|
| +#import('../../../lib/i18n/intl_message.dart');
|
| #import('../../../lib/unittest/unittest.dart');
|
|
|
| /**
|
| @@ -15,14 +15,15 @@
|
|
|
| main() {
|
| test('Message formatting', () {
|
| - var msg_format = new MessageFormat(
|
| - 'Message telling user how many emails will be sent.',
|
| - '''{NUM_EMAILS_TO_SEND, plural,
|
| - =0 {unused plural form}
|
| - =1 {One email will be sent.}
|
| - other {# emails will be sent.}}''');
|
| - // TODO(efortuna): Uncomment when functioning correctly.
|
| - //Expect.stringEquals('5 emails will be sent.',
|
| - // msg_formatter.format({'NUM_EMAILS_TO_SEND' : 5}));
|
| + msg_format(number) => new IntlMessage(
|
| + Intl.plural(number,
|
| + {'0': 'There are no emails left.',
|
| + '1': 'There is one email left.',
|
| + 'other': 'There are $number emails left.'}),
|
| + desc: 'Message telling user how many emails will be sent.',
|
| + examples: {'number': 32});
|
| + msg_format(5);
|
| });
|
| + // TODO(efortuna): Uncomment when functioning correctly.
|
| + //expect(msg_format(5), '5 emails will be sent.');
|
| }
|
|
|