Bug 128083 - Possible CppunitTest_sw_ooxmlexport3 testCalendar3 bug
Summary: Possible CppunitTest_sw_ooxmlexport3 testCalendar3 bug
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-11 07:47 UTC by Jim Raykowski
Modified: 2020-06-25 03:53 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2019-10-11 07:47:58 UTC
I have been trying help with bug 127706. The approach I have taken causes the cppunit test CppunitTest_sw_ooxmlexport3 to fail with:

ooxmlexport3.cxx:319:Assertion
Test name: testCalendar3::Import
equality assertion failed
- Expected: 6003669
- Actual  : 16711935

ooxmlexport3.cxx:319:Assertion
Test name: testCalendar3::Import_Export_Import
equality assertion failed
- Expected: 6003669
- Actual  : 16711935

Examining the test code I noticed getRun uses getParagraphOfText for the XTextRange reference argument in the testCalendar2 code: 

CPPUNIT_ASSERT_EQUAL(14.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharHeight"));

while in the testCalendar3 code getRun does not use getParagraphOfText

CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(xCell,1), "CharHeight"));

When I change getRun to use getParagraphOfText the test does not fail for the patch or unpatched version.

CPPUNIT_ASSERT_EQUAL(sal_Int32(0x5B9BD5), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharColor"));

CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharHeight"));

I believe this may be a bug since the patch does not fail for testCalendar2 check of CharHeight but does fail for the CharHeight check in testCalendar3 when the CharColor test is commented out, and both the CharColor and CharHeight tests in testCalendar3 do not fail when getParagraphOfText is used in getRun.
Comment 1 Xisco Faulí 2019-11-25 16:09:50 UTC
Hello Jim,
so the test fails with your patch but it passes without it ?
Comment 2 QA Administrators 2020-05-25 03:36:27 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2020-06-25 03:53:56 UTC
Dear Jim Raykowski,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp