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

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

Issue 10692022: Reapply r9192 and 9194, with the change of making locale a public field. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « tests/lib/i18n/date_time_format_test.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // 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 2 // 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 #library('intl_message_test'); 6 #library('intl_message_test');
7 7
8 #import('../../../lib/i18n/intl.dart'); 8 #import('../../../lib/i18n/intl.dart');
9 #import('../../../lib/i18n/intl_message.dart');
10 #import('../../../lib/unittest/unittest.dart'); 9 #import('../../../lib/unittest/unittest.dart');
11 10
12 /** 11 /** Tests the MessageFormat library in dart. */
13 * Tests the MessageFormat library in dart.
14 */
15 12
16 class Person { 13 class Person {
17 String firstName, lastName; 14 String firstName, lastName;
18 Person(this.firstName, this.lastName); 15 Person(this.firstName, this.lastName);
19 } 16 }
20 17
21 main() { 18 main() {
22 test('Trivial Message', () { 19 test('Trivial Message', () {
23 hello() => Intl.message('Hello, world!', 20 hello() => Intl.message('Hello, world!',
24 desc: 'hello world string'); 21 desc: 'hello world string');
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 desc: 'explains the locale'); 77 desc: 'explains the locale');
81 expect(Intl.withLocale('en-US', () => hello()), equals('locale=en-US')); 78 expect(Intl.withLocale('en-US', () => hello()), equals('locale=en-US'));
82 }); 79 });
83 80
84 test('Test passing locale', () { 81 test('Test passing locale', () {
85 hello(a_locale) => Intl.message('locale=${Intl.getCurrentLocale()}', 82 hello(a_locale) => Intl.message('locale=${Intl.getCurrentLocale()}',
86 desc: 'explains the locale', locale: a_locale); 83 desc: 'explains the locale', locale: a_locale);
87 expect(hello('en-US'), equals('locale=en-US')); 84 expect(hello('en-US'), equals('locale=en-US'));
88 }); 85 });
89 } 86 }
OLDNEW
« no previous file with comments | « tests/lib/i18n/date_time_format_test.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698