summaryrefslogtreecommitdiffstats
path: root/net/base/cert_database_nss_unittest.cc
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 10:36:28 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 10:36:28 +0000
commit515f2492fbc0a023eb089e91e349106da325de5e (patch)
treed606fd354fe6c4695fe2f635e62774fe582e8232 /net/base/cert_database_nss_unittest.cc
parenta834a1abc0a318a563d9a0eb3adec0df2947a982 (diff)
downloadchromium_src-515f2492fbc0a023eb089e91e349106da325de5e.zip
chromium_src-515f2492fbc0a023eb089e91e349106da325de5e.tar.gz
chromium_src-515f2492fbc0a023eb089e91e349106da325de5e.tar.bz2
Clang: enable -Wbool-conversions and -Wunused-variables on Linux.
-Wbool-conversion warns about EXPECT_EQ(false, blah), so replace that with EXPECT_FALSE(blah). Do the same with EXPECT_EQ(true, blah) for good measure (even though that doesn't generate warnings). Also remove the one instance of an unused variable. BUG=69421 TEST=buildbots all compile and all tests pass Review URL: http://codereview.chromium.org/6300001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71431 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cert_database_nss_unittest.cc')
-rw-r--r--net/base/cert_database_nss_unittest.cc33
1 files changed, 16 insertions, 17 deletions
diff --git a/net/base/cert_database_nss_unittest.cc b/net/base/cert_database_nss_unittest.cc
index 468c870..679afc4 100644
--- a/net/base/cert_database_nss_unittest.cc
+++ b/net/base/cert_database_nss_unittest.cc
@@ -184,8 +184,8 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_SSLTrust) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL,
- &failed));
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL,
+ &failed));
EXPECT_EQ(0U, failed.size());
@@ -216,8 +216,8 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_EmailTrust) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_EMAIL,
- &failed));
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_EMAIL,
+ &failed));
EXPECT_EQ(0U, failed.size());
@@ -247,8 +247,8 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_ObjSignTrust) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_OBJ_SIGN,
- &failed));
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_OBJ_SIGN,
+ &failed));
EXPECT_EQ(0U, failed.size());
@@ -278,8 +278,8 @@ TEST_F(CertDatabaseNSSTest, ImportCA_NotCACert) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true,
- cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL, &failed));
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL,
+ &failed));
ASSERT_EQ(1U, failed.size());
// Note: this compares pointers directly. It's okay in this case because
// ImportCACerts returns the same pointers that were passed in. In the
@@ -302,7 +302,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchy) {
// work (see
// http://mxr.mozilla.org/mozilla/source/security/nss/lib/certhigh/certvfy.c#752
// "XXX This choice of trustType seems arbitrary.")
- EXPECT_EQ(true, cert_db_.ImportCACerts(
+ EXPECT_TRUE(cert_db_.ImportCACerts(
certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL,
&failed));
@@ -322,7 +322,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyDupeRoot) {
// First import just the root.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(
+ EXPECT_TRUE(cert_db_.ImportCACerts(
certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL,
&failed));
@@ -337,7 +337,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyDupeRoot) {
// Now import with the other certs in the list too. Even though the root is
// already present, we should still import the rest.
failed.clear();
- EXPECT_EQ(true, cert_db_.ImportCACerts(
+ EXPECT_TRUE(cert_db_.ImportCACerts(
certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL,
&failed));
@@ -360,8 +360,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyUntrusted) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::UNTRUSTED,
- &failed));
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::UNTRUSTED, &failed));
ASSERT_EQ(1U, failed.size());
EXPECT_EQ("DOD CA-17", failed[0].certificate->subject().common_name);
@@ -382,7 +381,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyTree) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(
+ EXPECT_TRUE(cert_db_.ImportCACerts(
certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL,
&failed));
@@ -406,7 +405,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertNotHierarchy) {
// Import it.
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportCACerts(
+ EXPECT_TRUE(cert_db_.ImportCACerts(
certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL |
CertDatabase::TRUSTED_OBJ_SIGN, &failed));
@@ -434,7 +433,7 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert) {
ASSERT_EQ(2U, certs.size());
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportServerCert(certs, &failed));
+ EXPECT_TRUE(cert_db_.ImportServerCert(certs, &failed));
EXPECT_EQ(0U, failed.size());
@@ -462,7 +461,7 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert_SelfSigned) {
ASSERT_TRUE(ReadCertIntoList("punycodetest.der", &certs));
CertDatabase::ImportCertFailureList failed;
- EXPECT_EQ(true, cert_db_.ImportServerCert(certs, &failed));
+ EXPECT_TRUE(cert_db_.ImportServerCert(certs, &failed));
EXPECT_EQ(0U, failed.size());