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

Unified Diff: test/unittests/interpreter/constant-array-builder-unittest.cc

Issue 1696363002: Use a better hash function in IdentityMap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« src/identity-map.cc ('K') | « src/identity-map.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/constant-array-builder-unittest.cc
diff --git a/test/unittests/interpreter/constant-array-builder-unittest.cc b/test/unittests/interpreter/constant-array-builder-unittest.cc
index b32b1af55c3d3dfcd6f005dc177639190863d7ee..b3ec5ff6680113e19e076493145daabdf1af3066 100644
--- a/test/unittests/interpreter/constant-array-builder-unittest.cc
+++ b/test/unittests/interpreter/constant-array-builder-unittest.cc
@@ -33,13 +33,11 @@ STATIC_CONST_MEMBER_DEFINITION const size_t
TEST_F(ConstantArrayBuilderTest, AllocateAllEntries) {
ConstantArrayBuilder builder(isolate(), zone());
for (size_t i = 0; i < kMaxCapacity; i++) {
- Handle<Object> object = isolate()->factory()->NewNumberFromSize(i);
- builder.Insert(object);
- CHECK_EQ(builder.size(), i + 1);
- CHECK(builder.At(i)->SameValue(*object));
+ builder.Insert(handle(Smi::FromInt(static_cast<int>(i)), isolate()));
}
+ CHECK_EQ(builder.size(), kMaxCapacity);
for (size_t i = 0; i < kMaxCapacity; i++) {
- CHECK_EQ(Handle<Smi>::cast(builder.At(i))->value(), static_cast<double>(i));
+ CHECK_EQ(Handle<Smi>::cast(builder.At(i))->value(), i);
}
}
« src/identity-map.cc ('K') | « src/identity-map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698