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 | 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'); | 9 #import('../../../lib/i18n/intl_message.dart'); |
10 #import('../../../lib/unittest/unittest.dart'); | 10 #import('../../../lib/unittest/unittest.dart'); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 }); | 69 }); |
70 | 70 |
71 test('Message with object parameter', () { | 71 test('Message with object parameter', () { |
72 hello(person) => intl.message( | 72 hello(person) => intl.message( |
73 "Hello, my name is ${person.firstName} ${person.lastName}.", | 73 "Hello, my name is ${person.firstName} ${person.lastName}.", |
74 desc: "States a person's name.", | 74 desc: "States a person's name.", |
75 examples: {'first': 'Ford', 'last' : 'Prefect'}); | 75 examples: {'first': 'Ford', 'last' : 'Prefect'}); |
76 var ford = new Person('Ford', 'Prefect'); | 76 var ford = new Person('Ford', 'Prefect'); |
77 expect(hello(ford), equals('Hello, my name is Ford Prefect.')); | 77 expect(hello(ford), equals('Hello, my name is Ford Prefect.')); |
78 }); | 78 }); |
79 | |
80 test('Set locale', (){ | |
81 var de = new Intl('de_DE'); | |
82 expect(de.locale,equals('de_DE')); | |
Emily Fortuna
2012/07/31 05:52:53
space after ,
why put this in intl_message_test?
Alan Knight
2012/08/03 23:02:15
Done. Moved to a separate intl_test.dart.
| |
83 }); | |
79 } | 84 } |
OLD | NEW |