diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-06-05 13:28:58 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-05 13:28:58 +0000 |
commit | ac42dd2d4b5bfefcbdd023b196db45bff94a1a7c (patch) | |
tree | 216b3e3de5bc5cb064894b4030d43a7d3ce5fb4f /fpdfsdk | |
parent | dc235a42164fa3d9684e4a48d4383e7db632ebaa (diff) | |
download | pdfium-ac42dd2d4b5bfefcbdd023b196db45bff94a1a7c.tar.xz |
Improve FPDFPath_GetMatrix() tests
The test succeeded if FPDFPath_GetMatrix() did not touch its out
parameters, now this is covered.
Change-Id: I04e3c4bd55e0a8e403e88dbc23ec21e8d00eacf2
Reviewed-on: https://pdfium-review.googlesource.com/33870
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdf_edit_embeddertest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index 7ca2174440..b2a7c32153 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -258,6 +258,14 @@ TEST_F(FPDFEditEmbeddertest, AddPaths) { matrix_d, matrix_e, matrix_f)); EXPECT_TRUE(FPDFPath_SetMatrix(red_rect, matrix_a, matrix_b, matrix_c, matrix_d, matrix_e, matrix_f)); + // Set to 0 before FPDFPath_GetMatrix() to ensure they are actually set by + // the function. + matrix_a = 0; + matrix_b = 0; + matrix_c = 0; + matrix_d = 0; + matrix_e = 0; + matrix_f = 0; EXPECT_FALSE(FPDFPath_GetMatrix(nullptr, &matrix_a, &matrix_b, &matrix_c, &matrix_d, &matrix_e, &matrix_f)); EXPECT_TRUE(FPDFPath_GetMatrix(red_rect, &matrix_a, &matrix_b, &matrix_c, |