summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfview_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfview_embeddertest.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfview_embeddertest.cpp b/fpdfsdk/fpdfview_embeddertest.cpp
index 29eb91ab4d..10fe3aa822 100644
--- a/fpdfsdk/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/fpdfview_embeddertest.cpp
@@ -88,14 +88,16 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 2, fixed_buffer, &buffer_size);
EXPECT_EQ(nullptr, dest);
- EXPECT_EQ(sizeof(fixed_buffer), buffer_size); // unmodified.
+ EXPECT_EQ(sizeof(fixed_buffer),
+ static_cast<size_t>(buffer_size)); // unmodified.
// Try to retrieve the forth item with ample buffer. Item is taken
// from Dests NameTree but has a vale of the wrong type in named_dests.pdf.
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 3, fixed_buffer, &buffer_size);
EXPECT_EQ(nullptr, dest);
- EXPECT_EQ(sizeof(fixed_buffer), buffer_size); // unmodified.
+ EXPECT_EQ(sizeof(fixed_buffer),
+ static_cast<size_t>(buffer_size)); // unmodified.
// Try to retrieve fifth item with ample buffer. Item taken from the
// old-style Dests dictionary object in named_dests.pdf.
@@ -120,25 +122,29 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 6, fixed_buffer, &buffer_size);
EXPECT_EQ(nullptr, dest);
- EXPECT_EQ(sizeof(fixed_buffer), buffer_size); // unmodified.
+ EXPECT_EQ(sizeof(fixed_buffer),
+ static_cast<size_t>(buffer_size)); // unmodified.
// Try to underflow/overflow the integer index.
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), std::numeric_limits<int>::max(),
fixed_buffer, &buffer_size);
EXPECT_EQ(nullptr, dest);
- EXPECT_EQ(sizeof(fixed_buffer), buffer_size); // unmodified.
+ EXPECT_EQ(sizeof(fixed_buffer),
+ static_cast<size_t>(buffer_size)); // unmodified.
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), std::numeric_limits<int>::min(),
fixed_buffer, &buffer_size);
EXPECT_EQ(nullptr, dest);
- EXPECT_EQ(sizeof(fixed_buffer), buffer_size); // unmodified.
+ EXPECT_EQ(sizeof(fixed_buffer),
+ static_cast<size_t>(buffer_size)); // unmodified.
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), -1, fixed_buffer, &buffer_size);
EXPECT_EQ(nullptr, dest);
- EXPECT_EQ(sizeof(fixed_buffer), buffer_size); // unmodified.
+ EXPECT_EQ(sizeof(fixed_buffer),
+ static_cast<size_t>(buffer_size)); // unmodified.
}
TEST_F(FPDFViewEmbeddertest, NamedDestsByName) {