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

Unified Diff: net/der/input_unittest.cc

Issue 1664243002: Using == instead of Equals for der::Input comparison. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using non-class equality. Created 4 years, 10 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
« net/der/input.h ('K') | « net/der/input.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/der/input_unittest.cc
diff --git a/net/der/input_unittest.cc b/net/der/input_unittest.cc
index e7193b08b52a5be29823bb01d8b9732fb90594cc..6fcb436606fcae895d0ebb9ad5ee33d3da34c8ab 100644
--- a/net/der/input_unittest.cc
+++ b/net/der/input_unittest.cc
@@ -16,16 +16,16 @@ const uint8_t kInput2[] = {'t', 'e', 'a', 'l'};
TEST(InputTest, Equals) {
Input test(kInput);
Input test2(kInput);
- EXPECT_TRUE(test.Equals(test2));
+ EXPECT_EQ(test, test2);
uint8_t input_copy[arraysize(kInput)] = {0};
memcpy(input_copy, kInput, arraysize(kInput));
Input test_copy(input_copy);
- EXPECT_TRUE(test.Equals(test_copy));
+ EXPECT_EQ(test, test_copy);
Input test_truncated(kInput, arraysize(kInput) - 1);
- EXPECT_FALSE(test.Equals(test_truncated));
- EXPECT_FALSE(test_truncated.Equals(test));
+ EXPECT_NE(test, test_truncated);
+ EXPECT_NE(test_truncated, test);
}
TEST(InputTest, LessThan) {
@@ -53,7 +53,7 @@ TEST(InputTest, StaticArray) {
EXPECT_EQ(arraysize(kInput), input.Length());
Input input2(kInput);
- EXPECT_TRUE(input.Equals(input2));
+ EXPECT_EQ(input, input2);
}
TEST(ByteReaderTest, NoReadPastEnd) {
« net/der/input.h ('K') | « net/der/input.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698