summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfview_embeddertest.cpp')
-rw-r--r--fpdfsdk/src/fpdfview_embeddertest.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp
index 35da9b6caf..2606dc7a0e 100644
--- a/fpdfsdk/src/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfview_embeddertest.cpp
@@ -56,10 +56,10 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = 2000000; // Absurdly large, check not used for this case.
dest = FPDF_GetNamedDest(document(), 0, nullptr, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(12u, buffer_size);
+ EXPECT_EQ(10u, buffer_size);
// Try to retrieve the first item with too small a buffer.
- buffer_size = 10;
+ buffer_size = 8;
dest = FPDF_GetNamedDest(document(), 0, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
EXPECT_EQ(-1, buffer_size);
@@ -69,8 +69,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = 12;
dest = FPDF_GetNamedDest(document(), 0, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(12u, buffer_size);
- EXPECT_EQ(std::string("F\0i\0r\0s\0t\0\0\0", 12),
+ EXPECT_EQ(10u, buffer_size);
+ EXPECT_EQ(std::string("F\0i\0r\0s\0t\0", 10),
std::string(fixed_buffer, buffer_size));
// Try to retrieve the second item with ample buffer. Item is taken
@@ -78,8 +78,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 1, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(10u, buffer_size);
- EXPECT_EQ(std::string("N\0e\0x\0t\0\0\0", 10),
+ EXPECT_EQ(8u, buffer_size);
+ EXPECT_EQ(std::string("N\0e\0x\0t\0", 8),
std::string(fixed_buffer, buffer_size));
// Try to retrieve third item with ample buffer. Item is taken
@@ -102,8 +102,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 4, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(30u, buffer_size);
- EXPECT_EQ(std::string("F\0i\0r\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0\0\0", 30),
+ EXPECT_EQ(28u, buffer_size);
+ EXPECT_EQ(std::string("F\0i\0r\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0", 28),
std::string(fixed_buffer, buffer_size));
// Try to retrieve sixth item with ample buffer. Item istaken from the
@@ -112,8 +112,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) {
buffer_size = sizeof(fixed_buffer);
dest = FPDF_GetNamedDest(document(), 5, fixed_buffer, &buffer_size);
EXPECT_NE(nullptr, dest);
- EXPECT_EQ(28u, buffer_size);
- EXPECT_EQ(std::string("L\0a\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0\0\0", 28),
+ EXPECT_EQ(26u, buffer_size);
+ EXPECT_EQ(std::string("L\0a\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0", 26),
std::string(fixed_buffer, buffer_size));
// Try to retrieve non-existent item with ample buffer.