From 9b6fee14acedde5c6b627d5f9b691776fc8d868c Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Tue, 29 Sep 2009 18:13:07 +0000 Subject: Avoid potential "NULL used as int" warnings by changing ASSERT_EQ(NULL, ...) to ASSERT_TRUE(... == NULL). Patch by Jacob Mandelson (see http://codereview.chromium.org/202057 ), r=me. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27511 0039d316-1c4b-4281-b951-d872f2087c98 --- net/ftp/ftp_auth_cache_unittest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'net/ftp') diff --git a/net/ftp/ftp_auth_cache_unittest.cc b/net/ftp/ftp_auth_cache_unittest.cc index 3f04d96..b23781e 100644 --- a/net/ftp/ftp_auth_cache_unittest.cc +++ b/net/ftp/ftp_auth_cache_unittest.cc @@ -17,7 +17,7 @@ TEST(FtpAuthCacheTest, LookupAddRemove) { GURL origin2("ftp://foo2"); // Lookup non-existent entry. - EXPECT_EQ(NULL, cache.Lookup(origin1)); + EXPECT_TRUE(cache.Lookup(origin1) == NULL); // Add entry for origin1. cache.Add(origin1, L"username1", L"password1"); @@ -48,11 +48,11 @@ TEST(FtpAuthCacheTest, LookupAddRemove) { // Remove entry of origin1. cache.Remove(origin1, L"username3", L"password3"); - EXPECT_EQ(NULL, cache.Lookup(origin1)); + EXPECT_TRUE(cache.Lookup(origin1) == NULL); // Remove non-existent entry. cache.Remove(origin1, L"username3", L"password3"); - EXPECT_EQ(NULL, cache.Lookup(origin1)); + EXPECT_TRUE(cache.Lookup(origin1) == NULL); } // Check that if the origin differs only by port number, it is considered @@ -95,7 +95,7 @@ TEST(FtpAuthCacheTest, NormalizedKey) { // Remove cache.Remove(GURL("ftp://HOsT"), L"othername", L"otherword"); - EXPECT_EQ(NULL, cache.Lookup(GURL("ftp://host"))); + EXPECT_TRUE(cache.Lookup(GURL("ftp://host")) == NULL); } TEST(FtpAuthCacheTest, OnlyRemoveMatching) { @@ -110,7 +110,7 @@ TEST(FtpAuthCacheTest, OnlyRemoveMatching) { // Auth data matches, should remove. cache.Remove(GURL("ftp://host"), L"username", L"password"); - EXPECT_EQ(NULL, cache.Lookup(GURL("ftp://host"))); + EXPECT_TRUE(cache.Lookup(GURL("ftp://host")) == NULL); } TEST(FtpAuthCacheTest, EvictOldEntries) { @@ -126,7 +126,7 @@ TEST(FtpAuthCacheTest, EvictOldEntries) { // Adding one entry should cause eviction of the first entry. cache.Add(GURL("ftp://last_host"), L"username", L"password"); - EXPECT_EQ(NULL, cache.Lookup(GURL("ftp://host0"))); + EXPECT_TRUE(cache.Lookup(GURL("ftp://host0")) == NULL); // Remaining entries should not get evicted. for (size_t i = 1; i < FtpAuthCache::kMaxEntries; i++) { -- cgit v1.1