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

Unified Diff: crypto/rsa_private_key_unittest.cc

Issue 2677583002: Fix non-noise cpplint errors in //crypto. (Closed)
Patch Set: fix p224_unittest.cc Created 3 years, 11 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
« no previous file with comments | « crypto/random_unittest.cc ('k') | crypto/scoped_test_system_nss_key_slot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key_unittest.cc
diff --git a/crypto/rsa_private_key_unittest.cc b/crypto/rsa_private_key_unittest.cc
index 393a24c536453efcba9135f474dfeb8634c92c09..f9549f3418656621621557cb36fc7e949008ac93 100644
--- a/crypto/rsa_private_key_unittest.cc
+++ b/crypto/rsa_private_key_unittest.cc
@@ -103,10 +103,8 @@ TEST(RSAPrivateKeyUnitTest, InitRandomTest) {
ASSERT_EQ(privkey1.size(), privkey3.size());
ASSERT_EQ(privkey2.size(), privkey4.size());
- ASSERT_TRUE(0 == memcmp(&privkey1.front(), &privkey3.front(),
- privkey1.size()));
- ASSERT_TRUE(0 == memcmp(&privkey2.front(), &privkey4.front(),
- privkey2.size()));
+ ASSERT_EQ(0, memcmp(&privkey1.front(), &privkey3.front(), privkey1.size()));
+ ASSERT_EQ(0, memcmp(&privkey2.front(), &privkey4.front(), privkey2.size()));
}
// Test Copy() method.
@@ -195,8 +193,8 @@ TEST(RSAPrivateKeyUnitTest, PublicKeyTest) {
std::vector<uint8_t> output;
ASSERT_TRUE(key->ExportPublicKey(&output));
- ASSERT_TRUE(
- memcmp(expected_public_key_info, &output.front(), output.size()) == 0);
+ ASSERT_EQ(0,
+ memcmp(expected_public_key_info, &output.front(), output.size()));
}
// These two test keys each contain an integer that has 0x00 for its most
@@ -349,10 +347,8 @@ TEST(RSAPrivateKeyUnitTest, ShortIntegers) {
ASSERT_EQ(input1.size(), output1.size());
ASSERT_EQ(input2.size(), output2.size());
- ASSERT_TRUE(0 == memcmp(&output1.front(), &input1.front(),
- input1.size()));
- ASSERT_TRUE(0 == memcmp(&output2.front(), &input2.front(),
- input2.size()));
+ ASSERT_EQ(0, memcmp(&output1.front(), &input1.front(), input1.size()));
+ ASSERT_EQ(0, memcmp(&output2.front(), &input2.front(), input2.size()));
}
TEST(RSAPrivateKeyUnitTest, CreateFromKeyTest) {
« no previous file with comments | « crypto/random_unittest.cc ('k') | crypto/scoped_test_system_nss_key_slot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698