summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfdoc_embeddertest.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-07 10:46:22 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-07 10:46:23 -0700
commit4997b22f84307521a62838f874928bf56cd3423c (patch)
treead11d99ac0a491ee222e9d0a42ec3b6ad3354e2a /fpdfsdk/fpdfdoc_embeddertest.cpp
parent0687e76dc259c678b3f29a6608331f07ffd8f1e2 (diff)
downloadpdfium-4997b22f84307521a62838f874928bf56cd3423c.tar.xz
Get rid of NULLs in core/
Review-Url: https://codereview.chromium.org/2032613003
Diffstat (limited to 'fpdfsdk/fpdfdoc_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfdoc_embeddertest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index 2450b6aea6..e0880deca5 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];