Unit test failing on some machine
Pierre-Eric Pelloux-Prayer
pierre-eric at lanedo.com
Wed Jan 16 08:29:56 PST 2013
Hi all,
I recently added a new unit test to Writer docx test suite.
It's quite simple: a single page document with one table filling all the
page.
The test then verifies that after import/export the document has indeed
1 page.
(see sw/qa/extras/ooxmlexport/ooxmlexport.cxx and
sw/qa/extras/ooxmlexport/data/1-table-1-page.docx)
The problem is: on some machine, for instance
Linux-openSUSE-x86 at 18-Clang Tinderbox, this test is failing like this:
code:
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
result:
equality assertion failed
- Expected: 1
- Actual : 2
But on the very same machine, manually opening the docx file with
LibreOffice lead to a 1 page document.
I tried to fix that by:
- inserting a call to ViewShell::CalcLayout after loading the
document, and before querying the page count => fails
- use ViewShell::LayoutIdle instead => fails too
- making SwModelTestBase a SfxListener, and prevent the 'calcLayout'
method to return until SW_EVENT_LAYOUT_FINISHED event is received =>
fails too: if I block the execution, no events are received by the
Notify function (everything is running in the same thread maybe ?)
Any ideas of what I'm doing wrong or how to fix the issue ?
Thanks!
Pierre-Eric
More information about the LibreOffice
mailing list