Kaydet (Commit) 3bb64c0b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Check against concrete expected values in PdfExportTest::testTdf115262

With d464d505 "Refactor calc non-linear
ViewToDevice transform", the problems with my macOS build that I described in
the commit message of (abandoned) <https://gerrit.libreoffice.org/#/c/61651/>
"Omit 'Calc adjust to grid hack' when not rendering for the screen" are
apparently solved:  `make CppunitTest_vcl_pdfexport test` succeeds, and opening
vcl/qa/cppunit/pdfexport/data/tdf115262.ods and exporting it to PDF while the
on-screen Calc document is displayed at varying zoom levels leads to effectively
identical files now.

Assuming that 232 is the universally correct value for nFirstImageTop now
(nRowTop appears to have always evaluated to 199), it looks cleaner to me to
have the expected values spelled out explicitly in the test code.

Change-Id: Idb9f30f4ab9641b5b5325ddd90084e4112e1b572
Reviewed-on: https://gerrit.libreoffice.org/64171
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst d6938caa
...@@ -1577,8 +1577,8 @@ void PdfExportTest::testTdf115262() ...@@ -1577,8 +1577,8 @@ void PdfExportTest::testTdf115262()
} }
// Make sure that the top of the "400" is below the top of the image (in // Make sure that the top of the "400" is below the top of the image (in
// bottom-right-corner-based PDF coordinates). // bottom-right-corner-based PDF coordinates).
// This was: expected less than 144, actual is 199. CPPUNIT_ASSERT_EQUAL(232, nFirstImageTop);
CPPUNIT_ASSERT_LESS(nFirstImageTop, nRowTop); CPPUNIT_ASSERT_EQUAL(199, nRowTop);
FPDFText_ClosePage(pTextPage); FPDFText_ClosePage(pTextPage);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment