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

Side by Side Diff: tests/lib/i18n/intl_message_test.dart

Issue 10538033: MessageFormat fixup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/i18n/message_format.dart ('k') | tests/lib/i18n/message_format_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // for details. All rights reserved. Use of this source code is governed by a
3 * for details. All rights reserved. Use of this source code is governed by a 3 // BSD-style license that can be found in the LICENSE file.
4 * BSD-style license that can be found in the LICENSE file.
5 */
6 4
7 #library('message_format_test');
8 5
9 #import('../../../lib/i18n/message_format.dart'); 6 #library('intl_message_test');
7
8 #import('../../../lib/i18n/intl.dart');
9 #import('../../../lib/i18n/intl_message.dart');
10 #import('../../../lib/unittest/unittest.dart'); 10 #import('../../../lib/unittest/unittest.dart');
11 11
12 /** 12 /**
13 * Tests the MessageFormat library in dart. 13 * Tests the MessageFormat library in dart.
14 */ 14 */
15 15
16 main() { 16 main() {
17 test('Message formatting', () { 17 test('Message formatting', () {
18 var msg_format = new MessageFormat( 18 msg_format(number) => new IntlMessage(
19 'Message telling user how many emails will be sent.', 19 Intl.plural(number,
20 '''{NUM_EMAILS_TO_SEND, plural, 20 {'0': 'There are no emails left.',
21 =0 {unused plural form} 21 '1': 'There is one email left.',
22 =1 {One email will be sent.} 22 'other': 'There are $number emails left.'}),
23 other {# emails will be sent.}}'''); 23 desc: 'Message telling user how many emails will be sent.',
24 // TODO(efortuna): Uncomment when functioning correctly. 24 examples: {'number': 32});
25 //Expect.stringEquals('5 emails will be sent.', 25 msg_format(5);
26 // msg_formatter.format({'NUM_EMAILS_TO_SEND' : 5}));
27 }); 26 });
27 // TODO(efortuna): Uncomment when functioning correctly.
28 //expect(msg_format(5), '5 emails will be sent.');
28 } 29 }
OLDNEW
« no previous file with comments | « lib/i18n/message_format.dart ('k') | tests/lib/i18n/message_format_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698