From 1ef04c9bc0c19dd815f64ec48e7eef106cf88b49 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 8 May 2017 18:14:19 +0200 Subject: fpdfsdk: add minimal FPDFPageObj_GetType() testcase I did not realize it's possible to easily test public API when the function itself was added in commit 1423319f52c5e80253d337ad02b19187c6d66ff1 (Add public method FPDFPageObj_GetType to get type of a page object., 2017-04-03). Change-Id: I4b6f4a18eabbebbebb350e69db2b187b35c38da6 Reviewed-on: https://pdfium-review.googlesource.com/5071 Reviewed-by: dsinclair Commit-Queue: dsinclair --- fpdfsdk/fpdfedit_embeddertest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp index 05b665b33f..ed5fe3e7f8 100644 --- a/fpdfsdk/fpdfedit_embeddertest.cpp +++ b/fpdfsdk/fpdfedit_embeddertest.cpp @@ -265,6 +265,9 @@ TEST_F(FPDFEditEmbeddertest, AddPaths) { FPDF_PAGEOBJECT green_rect = FPDFPageObj_CreateNewRect(100, 100, 40, 40); EXPECT_TRUE(FPDFPath_SetFillColor(green_rect, 0, 255, 0, 128)); + // Make sure the type of the rectangle is a path. + EXPECT_EQ(FPDF_PAGEOBJ_PATH, FPDFPageObj_GetType(green_rect)); + // Make sure we get back the same color we set previously. unsigned int R; unsigned int G; -- cgit v1.2.3