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

Unified Diff: core/fxcrt/fx_basic_bstring_unittest.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 years, 6 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 | « core/fxcrt/fx_basic_array.cpp ('k') | core/fxcrt/fx_basic_gcc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 fe98b53b45947caddd58821a668c64ba1d24e3c6..220105aa9548186be58fd17b5e5b3ae1e61258d7 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);
« no previous file with comments | « core/fxcrt/fx_basic_array.cpp ('k') | core/fxcrt/fx_basic_gcc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698