From 4997b22f84307521a62838f874928bf56cd3423c Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 7 Jun 2016 10:46:22 -0700 Subject: Get rid of NULLs in core/ Review-Url: https://codereview.chromium.org/2032613003 --- core/fxcrt/fx_basic_bstring_unittest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/fxcrt/fx_basic_bstring_unittest.cpp') diff --git a/core/fxcrt/fx_basic_bstring_unittest.cpp b/core/fxcrt/fx_basic_bstring_unittest.cpp index fe98b53b45..220105aa95 100644 --- a/core/fxcrt/fx_basic_bstring_unittest.cpp +++ b/core/fxcrt/fx_basic_bstring_unittest.cpp @@ -251,7 +251,7 @@ TEST(fxcrt, ByteStringOperatorNE) { TEST(fxcrt, ByteStringCNull) { CFX_ByteStringC null_string; - EXPECT_EQ(null_string.raw_str(), nullptr); + EXPECT_FALSE(null_string.raw_str()); EXPECT_EQ(null_string.GetLength(), 0); EXPECT_TRUE(null_string.IsEmpty()); @@ -259,27 +259,27 @@ TEST(fxcrt, ByteStringCNull) { EXPECT_EQ(null_string, another_null_string); CFX_ByteStringC copied_null_string(null_string); - EXPECT_EQ(copied_null_string.raw_str(), nullptr); + EXPECT_FALSE(copied_null_string.raw_str()); EXPECT_EQ(copied_null_string.GetLength(), 0); EXPECT_TRUE(copied_null_string.IsEmpty()); EXPECT_EQ(null_string, copied_null_string); CFX_ByteStringC empty_string(""); // Pointer to NUL, not NULL pointer. - EXPECT_NE(empty_string.raw_str(), nullptr); + EXPECT_TRUE(empty_string.raw_str()); EXPECT_EQ(empty_string.GetLength(), 0); EXPECT_TRUE(empty_string.IsEmpty()); EXPECT_EQ(null_string, empty_string); - CFX_ByteStringC assigned_null_string("initially not NULL"); + CFX_ByteStringC assigned_null_string("initially not nullptr"); assigned_null_string = null_string; - EXPECT_EQ(assigned_null_string.raw_str(), nullptr); + EXPECT_FALSE(assigned_null_string.raw_str()); EXPECT_EQ(assigned_null_string.GetLength(), 0); EXPECT_TRUE(assigned_null_string.IsEmpty()); EXPECT_EQ(null_string, assigned_null_string); - CFX_ByteStringC assigned_nullptr_string("initially not NULL"); + CFX_ByteStringC assigned_nullptr_string("initially not nullptr"); assigned_nullptr_string = (const FX_CHAR*)nullptr; - EXPECT_EQ(assigned_nullptr_string.raw_str(), nullptr); + EXPECT_FALSE(assigned_nullptr_string.raw_str()); EXPECT_EQ(assigned_nullptr_string.GetLength(), 0); EXPECT_TRUE(assigned_nullptr_string.IsEmpty()); EXPECT_EQ(null_string, assigned_nullptr_string); -- cgit v1.2.3