OLD | NEW |
1 /** | 1 /** |
2 * 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 |
3 * 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 |
4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #library('number_format_test'); | 7 #library('number_format_test'); |
8 | 8 |
9 // TODO(rnystrom): Use "package:" URL (#4968). | 9 #import('../../../pkg/unittest/unittest.dart'); |
10 #import('../../../pkg/unittest/lib/unittest.dart'); | |
11 #import('../number_format.dart'); | 10 #import('../number_format.dart'); |
12 #import('../intl.dart'); | 11 #import('../intl.dart'); |
13 | 12 |
14 /** | 13 /** |
15 * Tests the Numeric formatting library in dart. | 14 * Tests the Numeric formatting library in dart. |
16 */ | 15 */ |
17 var testNumbers = const { | 16 var testNumbers = const { |
18 "0.001": 0.001, | 17 "0.001": 0.001, |
19 "0.01": 0.01, | 18 "0.01": 0.01, |
20 "0.1": 0.1, | 19 "0.1": 0.1, |
(...skipping 20 matching lines...) Expand all Loading... |
41 }); | 40 }); |
42 | 41 |
43 test('Simple set of numbers', () { | 42 test('Simple set of numbers', () { |
44 var number = new NumberFormat(); | 43 var number = new NumberFormat(); |
45 for (var x in testNumbers.getKeys()) { | 44 for (var x in testNumbers.getKeys()) { |
46 var formatted = number.format(testNumbers[x]); | 45 var formatted = number.format(testNumbers[x]); |
47 expect(formatted, x); | 46 expect(formatted, x); |
48 } | 47 } |
49 }); | 48 }); |
50 } | 49 } |
OLD | NEW |