OLD | NEW |
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 #library('intl_message_test'); | 5 #library('intl_message_test'); |
6 | 6 |
| 7 // TODO(rnystrom): Use "package:" URL (#4968). |
7 #import('../intl.dart'); | 8 #import('../intl.dart'); |
8 #import('../../unittest/unittest.dart'); | 9 #import('../../unittest/lib/unittest.dart'); |
9 #import('../message_lookup_local.dart'); | 10 #import('../message_lookup_local.dart'); |
10 | 11 |
11 /** Tests the MessageFormat library in dart. */ | 12 /** Tests the MessageFormat library in dart. */ |
12 | 13 |
13 class Person { | 14 class Person { |
14 String firstName, lastName; | 15 String firstName, lastName; |
15 Person(this.firstName, this.lastName); | 16 Person(this.firstName, this.lastName); |
16 } | 17 } |
17 | 18 |
18 main() { | 19 main() { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 desc: 'explains the locale'); | 82 desc: 'explains the locale'); |
82 expect(Intl.withLocale('en-US', () => hello()), equals('locale=en-US')); | 83 expect(Intl.withLocale('en-US', () => hello()), equals('locale=en-US')); |
83 }); | 84 }); |
84 | 85 |
85 test('Test passing locale', () { | 86 test('Test passing locale', () { |
86 hello(a_locale) => Intl.message('locale=${Intl.getCurrentLocale()}', | 87 hello(a_locale) => Intl.message('locale=${Intl.getCurrentLocale()}', |
87 desc: 'explains the locale', locale: a_locale); | 88 desc: 'explains the locale', locale: a_locale); |
88 expect(hello('en-US'), equals('locale=en_US')); | 89 expect(hello('en-US'), equals('locale=en_US')); |
89 }); | 90 }); |
90 } | 91 } |
OLD | NEW |