OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Dart test for linked hash-maps. | 5 // Dart test for linked hash-maps. |
6 library linkedHashMap.test; | 6 library linkedHashMap.test; |
7 import "package:expect/expect.dart"; | |
8 import 'dart:collection' show LinkedHashMap; | 7 import 'dart:collection' show LinkedHashMap; |
9 | 8 |
10 class LinkedHashMapTest { | 9 class LinkedHashMapTest { |
11 static void testMain() { | 10 static void testMain() { |
12 Map map = new LinkedHashMap(); | 11 Map map = new LinkedHashMap(); |
13 map["a"] = 1; | 12 map["a"] = 1; |
14 map["b"] = 2; | 13 map["b"] = 2; |
15 map["c"] = 3; | 14 map["c"] = 3; |
16 map["d"] = 4; | 15 map["d"] = 4; |
17 map["e"] = 5; | 16 map["e"] = 5; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 106 |
108 clear(); | 107 clear(); |
109 map.values.forEach(testForEachValue); | 108 map.values.forEach(testForEachValue); |
110 verifyValues(valuesAfterAUpdate); | 109 verifyValues(valuesAfterAUpdate); |
111 } | 110 } |
112 } | 111 } |
113 | 112 |
114 main() { | 113 main() { |
115 LinkedHashMapTest.testMain(); | 114 LinkedHashMapTest.testMain(); |
116 } | 115 } |
OLD | NEW |