diff options
| author | Tom Hudson <tomhudson@google.com> | 2015-10-29 09:55:42 -0400 |
|---|---|---|
| committer | Tom Hudson <tomhudson@google.com> | 2015-10-29 09:55:42 -0400 |
| commit | 2880df2609eba09b555ca37be04b6ad89290c765 (patch) | |
| tree | 3edc51fb7bbb40d749dd760f72f4a8a1e470e75a /tests/DynamicHashTest.cpp | |
| parent | f7834221ac5342a3446b9b299398ea3ff7976946 (diff) | |
Revert "Revert "Merge remote-tracking branch 'goog/master-skia' into goog/master""
When I broke android yesterday we reverted this merge to fix the breakage.
Undoing that revert so we can pull in the fix from Skia.
Diffstat (limited to 'tests/DynamicHashTest.cpp')
| -rw-r--r-- | tests/DynamicHashTest.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/DynamicHashTest.cpp b/tests/DynamicHashTest.cpp index 4a5bb850f8..289b332c02 100644 --- a/tests/DynamicHashTest.cpp +++ b/tests/DynamicHashTest.cpp @@ -100,14 +100,14 @@ DEF_TEST(DynamicHash_lookup, reporter) { ASSERT(hash.countCollisions(9) == 2); // We can find our data right? - ASSERT(hash.find(1) != NULL); + ASSERT(hash.find(1) != nullptr); ASSERT(hash.find(1)->value == 2.0); - ASSERT(hash.find(5) != NULL); + ASSERT(hash.find(5) != nullptr); ASSERT(hash.find(5)->value == 3.0); // These aren't in the hash. - ASSERT(hash.find(2) == NULL); - ASSERT(hash.find(9) == NULL); + ASSERT(hash.find(2) == nullptr); + ASSERT(hash.find(9) == nullptr); } DEF_TEST(DynamicHash_remove, reporter) { @@ -123,16 +123,16 @@ DEF_TEST(DynamicHash_remove, reporter) { hash.remove(1); // a should be marked deleted, and b should still be findable. - ASSERT(hash.find(1) == NULL); - ASSERT(hash.find(5) != NULL); + ASSERT(hash.find(1) == nullptr); + ASSERT(hash.find(5) != nullptr); ASSERT(hash.find(5)->value == 3.0); // This will go in the same slot as 'a' did before. ASSERT(hash.countCollisions(9) == 0); hash.add(&c); - ASSERT(hash.find(9) != NULL); + ASSERT(hash.find(9) != nullptr); ASSERT(hash.find(9)->value == 4.0); - ASSERT(hash.find(5) != NULL); + ASSERT(hash.find(5) != nullptr); ASSERT(hash.find(5)->value == 3.0); } @@ -161,7 +161,7 @@ template<typename T> static void TestIter(skiatest::Reporter* reporter) { for (T iter(&hash); !iter.done(); ++iter) { int key = (*iter).key; keys[count] = key; - ASSERT(hash.find(key) != NULL); + ASSERT(hash.find(key) != nullptr); ++count; } ASSERT(3 == count); @@ -177,7 +177,7 @@ template<typename T> static void TestIter(skiatest::Reporter* reporter) { int key = (*iter).key; keys[count] = key; ASSERT(key != 1); - ASSERT(hash.find(key) != NULL); + ASSERT(hash.find(key) != nullptr); ++count; } ASSERT(2 == count); @@ -215,8 +215,8 @@ static void TestResetOrRewind(skiatest::Reporter* reporter, bool testReset) { ASSERT(hash.count() == 2); ASSERT(hash.capacity() == 4); - ASSERT(hash.find(1) != NULL); - ASSERT(hash.find(2) != NULL); + ASSERT(hash.find(1) != nullptr); + ASSERT(hash.find(2) != nullptr); } DEF_TEST(DynamicHash_reset, reporter) { |
