diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 18:13:07 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 18:13:07 +0000 |
commit | 9b6fee14acedde5c6b627d5f9b691776fc8d868c (patch) | |
tree | 8cd3438dc3b6504066f89096e37db4cff4b903ed /net/ftp | |
parent | b1ed7b9beaf3069b54084c453da6db6bed56607c (diff) | |
download | chromium_src-9b6fee14acedde5c6b627d5f9b691776fc8d868c.zip chromium_src-9b6fee14acedde5c6b627d5f9b691776fc8d868c.tar.gz chromium_src-9b6fee14acedde5c6b627d5f9b691776fc8d868c.tar.bz2 |
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
Diffstat (limited to 'net/ftp')
-rw-r--r-- | net/ftp/ftp_auth_cache_unittest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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++) { |