From 96fcdcc219d2a0d3579719b84b28bede76efba64 Mon Sep 17 00:00:00 2001 From: halcanary Date: Thu, 27 Aug 2015 07:41:13 -0700 Subject: Style Change: NULL->nullptr DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002 --- tests/DynamicHashTest.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/DynamicHashTest.cpp') 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 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 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) { -- cgit v1.2.3