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

Side by Side Diff: runtime/bin/hashmap_test.cc

Issue 1980573003: fix all instances of "the the" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | runtime/vm/flow_graph_allocator.cc » ('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) 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 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "platform/globals.h" 6 #include "platform/globals.h"
7 #include "platform/hashmap.h" 7 #include "platform/hashmap.h"
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 // Remove all these values. 140 // Remove all these values.
141 x = start; 141 x = start;
142 for (uint32_t i = 0; i < n; i++) { 142 for (uint32_t i = 0; i < n; i++) {
143 EXPECT_EQ(n - i, set.occupancy()); 143 EXPECT_EQ(n - i, set.occupancy());
144 EXPECT(set.Present(x)); 144 EXPECT(set.Present(x));
145 set.Remove(x); 145 set.Remove(x);
146 EXPECT(!set.Present(x)); 146 EXPECT(!set.Present(x));
147 x = x * factor + offset; 147 x = x * factor + offset;
148 148
149 // Verify the the expected values are still there. 149 // Verify the expected values are still there.
150 int y = start; 150 int y = start;
151 for (uint32_t j = 0; j < n; j++) { 151 for (uint32_t j = 0; j < n; j++) {
152 if (j <= i) { 152 if (j <= i) {
153 EXPECT(!set.Present(y)); 153 EXPECT(!set.Present(y));
154 } else { 154 } else {
155 EXPECT(set.Present(y)); 155 EXPECT(set.Present(y));
156 } 156 }
157 y = y * factor + offset; 157 y = y * factor + offset;
158 } 158 }
159 } 159 }
160 EXPECT_EQ(0u, set.occupancy()); 160 EXPECT_EQ(0u, set.occupancy());
161 } 161 }
162 162
163 163
164 UNIT_TEST_CASE(Set) { 164 UNIT_TEST_CASE(Set) {
165 TestSet(WordHash, 100); 165 TestSet(WordHash, 100);
166 TestSet(Hash, 100); 166 TestSet(Hash, 100);
167 TestSet(CollisionHash1, 50); 167 TestSet(CollisionHash1, 50);
168 TestSet(CollisionHash2, 50); 168 TestSet(CollisionHash2, 50);
169 TestSet(CollisionHash3, 50); 169 TestSet(CollisionHash3, 50);
170 TestSet(CollisionHash4, 50); 170 TestSet(CollisionHash4, 50);
171 } 171 }
172 172
173 } // namespace dart 173 } // namespace dart
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698