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

Side by Side Diff: tests/corelib/linked_hash_map_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/corelib/json_test.dart ('k') | tests/corelib/list_first_test.dart » ('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) 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 6
7 class LinkedHashMapTest { 7 class LinkedHashMapTest {
8 static void testMain() { 8 static void testMain() {
9 Map map = new LinkedHashMap(); 9 Map map = new LinkedHashMap();
10 map["a"] = 1; 10 map["a"] = 1;
11 map["b"] = 2; 11 map["b"] = 2;
12 map["c"] = 3; 12 map["c"] = 3;
13 map["d"] = 4; 13 map["d"] = 4;
14 map["e"] = 5; 14 map["e"] = 5;
15 15
16 List<String> keys = new List<String>(5); 16 List<String> keys = new List<String>.fixedLength(5);
17 List<int> values = new List<int>(5); 17 List<int> values = new List<int>.fixedLength(5);
18 18
19 int index; 19 int index;
20 20
21 clear() { 21 clear() {
22 index = 0; 22 index = 0;
23 for (int i = 0; i < keys.length; i++) { 23 for (int i = 0; i < keys.length; i++) {
24 keys[i] = null; 24 keys[i] = null;
25 values[i] = null; 25 values[i] = null;
26 } 26 }
27 } 27 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 clear(); 105 clear();
106 map.values.forEach(testForEachValue); 106 map.values.forEach(testForEachValue);
107 verifyValues(valuesAfterAUpdate); 107 verifyValues(valuesAfterAUpdate);
108 } 108 }
109 } 109 }
110 110
111 main() { 111 main() {
112 LinkedHashMapTest.testMain(); 112 LinkedHashMapTest.testMain();
113 } 113 }
OLDNEW
« no previous file with comments | « tests/corelib/json_test.dart ('k') | tests/corelib/list_first_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698