| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |