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

Side by Side Diff: test/cctest/test-identity-map.cc

Issue 1417203003: Allow IdentityMap to store Smi-0. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/identity-map.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/identity-map.h" 7 #include "src/identity-map.h"
8 #include "src/zone.h" 8 #include "src/zone.h"
9 9
10 #include "test/cctest/cctest.h" 10 #include "test/cctest/cctest.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 } 172 }
173 173
174 174
175 TEST(GetFind_num_1000) { 175 TEST(GetFind_num_1000) {
176 const int kPrime = 137; 176 const int kPrime = 137;
177 IdentityMapTester t; 177 IdentityMapTester t;
178 int val1; 178 int val1;
179 int val2; 179 int val2;
180 180
181 for (int i = 1; i < 1000; i++) { 181 for (int i = 0; i < 1000; i++) {
182 t.TestGetFind(t.smi(i * kPrime), &val1, t.smi(i * kPrime + 1), &val2); 182 t.TestGetFind(t.smi(i * kPrime), &val1, t.smi(i * kPrime + 1), &val2);
183 } 183 }
184 } 184 }
185 185
186 186
187 TEST(GetFind_smi_gc) { 187 TEST(GetFind_smi_gc) {
188 const int kKey = 33; 188 const int kKey = 33;
189 const int kShift = 1211; 189 const int kShift = 1211;
190 IdentityMapTester t; 190 IdentityMapTester t;
191 191
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 // Check that searching for the numbers finds the same values. 332 // Check that searching for the numbers finds the same values.
333 for (size_t i = 0; i < arraysize(num_keys); i++) { 333 for (size_t i = 0; i < arraysize(num_keys); i++) {
334 t.CheckFind(num_keys[i], &num_keys[i]); 334 t.CheckFind(num_keys[i], &num_keys[i]);
335 t.CheckGet(num_keys[i], &num_keys[i]); 335 t.CheckGet(num_keys[i], &num_keys[i]);
336 } 336 }
337 } 337 }
338 338
339 } // namespace internal 339 } // namespace internal
340 } // namespace v8 340 } // namespace v8
OLDNEW
« no previous file with comments | « src/identity-map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698