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

Unified Diff: net/ftp/ftp_auth_cache_unittest.cc

Issue 202057: Replace EXPECT_EQ(NULL, foo) with EXPECT_TRUE(NULL == foo).... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
Index: net/ftp/ftp_auth_cache_unittest.cc
===================================================================
--- net/ftp/ftp_auth_cache_unittest.cc (revision 27387)
+++ net/ftp/ftp_auth_cache_unittest.cc (working copy)
@@ -17,7 +17,7 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
// 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++) {

Powered by Google App Engine
This is Rietveld 408576698