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

Unified Diff: test/cctest/test-dictionary.cc

Issue 2381843002: Add Smi::Zero and replace all Smi::FromInt(0) calls (Closed)
Patch Set: Mark Smi::kZero as V8_EXPORT_PRIVATE Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-code-stub-assembler.cc ('k') | test/cctest/test-field-type-tracking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-dictionary.cc
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc
index c1184fa2b455a8d15bc859d1bbaec4da124e3a3a..d7344a142fdb98200ee7d6e5645cb711d5d4a60e 100644
--- a/test/cctest/test-dictionary.cc
+++ b/test/cctest/test-dictionary.cc
@@ -212,7 +212,7 @@ TEST(HashTableRehash) {
for (int i = 0; i < capacity - 1; i++) {
t->insert(i, i * i, i);
}
- t->Rehash(handle(Smi::FromInt(0), isolate));
+ t->Rehash(handle(Smi::kZero, isolate));
for (int i = 0; i < capacity - 1; i++) {
CHECK_EQ(i, t->lookup(i * i));
}
@@ -225,7 +225,7 @@ TEST(HashTableRehash) {
for (int i = 0; i < capacity / 2; i++) {
t->insert(i, i * i, i);
}
- t->Rehash(handle(Smi::FromInt(0), isolate));
+ t->Rehash(handle(Smi::kZero, isolate));
for (int i = 0; i < capacity / 2; i++) {
CHECK_EQ(i, t->lookup(i * i));
}
@@ -304,7 +304,7 @@ TEST(SetRequiresCopyOnCapacityChange) {
dict->SetRequiresCopyOnCapacityChange();
Handle<Name> key = isolate->factory()->InternalizeString(
v8::Utils::OpenHandle(*v8_str("key")));
- Handle<Object> value = handle(Smi::FromInt(0), isolate);
+ Handle<Object> value = handle(Smi::kZero, isolate);
Handle<NameDictionary> new_dict =
NameDictionary::Add(dict, key, value, PropertyDetails::Empty());
CHECK_NE(*dict, *new_dict);
« no previous file with comments | « test/cctest/test-code-stub-assembler.cc ('k') | test/cctest/test-field-type-tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698