summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_edit_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_edit_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdf_edit_embeddertest.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 52cc9fed86..ee80f3a20c 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -560,12 +560,8 @@ void CheckMarkCounts(FPDF_PAGE page,
EXPECT_EQ(L"Factor", key);
EXPECT_EQ(FPDF_OBJECT_NUMBER,
- FPDFPageObjMark_GetParamValueType(mark, 0));
- int square_root = FPDFPageObjMark_GetParamIntValue(mark, 0);
- EXPECT_EQ(expected_square, square_root * square_root);
-
- EXPECT_EQ(FPDF_OBJECT_NUMBER,
FPDFPageObjMark_GetParamValueTypeByKey(mark, "Factor"));
+ int square_root;
EXPECT_TRUE(FPDFPageObjMark_GetParamIntValueByKey(mark, "Factor",
&square_root));
EXPECT_EQ(expected_square, square_root * square_root);
@@ -583,16 +579,6 @@ void CheckMarkCounts(FPDF_PAGE page,
GetPlatformWString(reinterpret_cast<unsigned short*>(buffer));
EXPECT_EQ(L"Position", key);
- EXPECT_EQ(FPDF_OBJECT_STRING,
- FPDFPageObjMark_GetParamValueType(mark, 0));
- unsigned long get_param_value_return =
- FPDFPageObjMark_GetParamStringValue(mark, 0, buffer, 256);
- ASSERT_GT(get_param_value_return, 0u);
- EXPECT_EQ((4u + 1u) * 2u, get_param_value_return);
- std::wstring value =
- GetPlatformWString(reinterpret_cast<unsigned short*>(buffer));
- EXPECT_EQ(L"Last", value);
-
// Should be the last object.
EXPECT_EQ(object_count - 1, i);
@@ -603,7 +589,8 @@ void CheckMarkCounts(FPDF_PAGE page,
mark, "Position", buffer, 256, &length));
ASSERT_GT(length, 0u);
EXPECT_EQ((4u + 1u) * 2u, length);
- value = GetPlatformWString(reinterpret_cast<unsigned short*>(buffer));
+ std::wstring value =
+ GetPlatformWString(reinterpret_cast<unsigned short*>(buffer));
EXPECT_EQ(L"Last", value);
} else {
FAIL();