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

Unified Diff: fpdfsdk/fpdfdoc_embeddertest.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/fxge/win32/win32_int.h ('k') | fpdfsdk/fpdftext_embeddertest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfdoc_embeddertest.cpp
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index 2450b6aea61cc829a3d59e6f71fd40adee61ff6e..e0880deca57e5dfb41c3cf990d40dad8549d5a6e 100644
--- a/fpdfsdk/fpdfdoc_embeddertest.cpp
+++ b/fpdfsdk/fpdfdoc_embeddertest.cpp
@@ -23,22 +23,22 @@ TEST_F(FPDFDocEmbeddertest, DestGetPageIndex) {
// Page number directly in item from Dests NameTree.
FPDF_DEST dest = FPDF_GetNamedDestByName(document(), "First");
- EXPECT_NE(nullptr, dest);
+ EXPECT_TRUE(dest);
EXPECT_EQ(1U, FPDFDest_GetPageIndex(document(), dest));
// Page number via object reference in item from Dests NameTree.
dest = FPDF_GetNamedDestByName(document(), "Next");
- EXPECT_NE(nullptr, dest);
+ EXPECT_TRUE(dest);
EXPECT_EQ(1U, FPDFDest_GetPageIndex(document(), dest));
// Page number directly in item from Dests dictionary.
dest = FPDF_GetNamedDestByName(document(), "FirstAlternate");
- EXPECT_NE(nullptr, dest);
+ EXPECT_TRUE(dest);
EXPECT_EQ(11U, FPDFDest_GetPageIndex(document(), dest));
// Invalid object reference in item from Dests NameTree.
dest = FPDF_GetNamedDestByName(document(), "LastAlternate");
- EXPECT_NE(nullptr, dest);
+ EXPECT_TRUE(dest);
EXPECT_EQ(0U, FPDFDest_GetPageIndex(document(), dest));
}
@@ -88,7 +88,7 @@ TEST_F(FPDFDocEmbeddertest, Bookmarks) {
EXPECT_EQ(0u, FPDFBookmark_GetTitle(nullptr, buf, sizeof(buf)));
FPDF_BOOKMARK child = FPDFBookmark_GetFirstChild(document(), nullptr);
- EXPECT_NE(nullptr, child);
+ EXPECT_TRUE(child);
EXPECT_EQ(34u, FPDFBookmark_GetTitle(child, buf, sizeof(buf)));
EXPECT_EQ(CFX_WideString(L"A Good Beginning"),
CFX_WideString::FromUTF16LE(buf, 16));
@@ -96,7 +96,7 @@ TEST_F(FPDFDocEmbeddertest, Bookmarks) {
EXPECT_EQ(nullptr, FPDFBookmark_GetFirstChild(document(), child));
FPDF_BOOKMARK sibling = FPDFBookmark_GetNextSibling(document(), child);
- EXPECT_NE(nullptr, sibling);
+ EXPECT_TRUE(sibling);
EXPECT_EQ(28u, FPDFBookmark_GetTitle(sibling, buf, sizeof(buf)));
EXPECT_EQ(CFX_WideString(L"A Good Ending"),
CFX_WideString::FromUTF16LE(buf, 13));
@@ -112,7 +112,7 @@ TEST_F(FPDFDocEmbeddertest, FindBookmarks) {
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title =
GetFPDFWideString(L"A Good Beginning");
FPDF_BOOKMARK child = FPDFBookmark_Find(document(), title.get());
- EXPECT_NE(nullptr, child);
+ EXPECT_TRUE(child);
// Check that the string matches.
unsigned short buf[128];
« no previous file with comments | « core/fxge/win32/win32_int.h ('k') | fpdfsdk/fpdftext_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698