2013/10/8 Siqi Liu <me@siqi.fr>
Hello all,
Hi,
I've been investigating on this issue and I've tried the patch from Julien
and it still doesn't seem to fix the problem. There unit test always fails
on the equality assertion even if we reverse that as well.
Here is what I've got:
When we check against sal_Int32(0xD99594) (i.e. 14259604 in decimal) for
start color aGradient.StartColor
equality assertion failed
- Expected: 14259604
- Actual : 12603469
and When we check against sal_Int32(0xC0504D) (i.e. 12603469 in decimal)
for start color aGradient.StartColor
equality assertion failed
- Expected: 12603469
- Actual : 14259604
That is, whenever we reverse the hex value (the expected value) for the
unit test, the actual value coming out of the test is surprisingly reversed
as well!! Which I failed to explain...
I have to assume that there are other filters that are tested against this
unit test (which in this case needs to reverse the startColor/endColor as I
have done in the ooxmlexport filter) or there are some hidden mechanism in
this unit test that changes the actual value when we change the expected
value...
My previous patch was tested (on OSX so without unit tests) during the
Milano hackathon and it has solved an interoperability bug so presumbly we
should keep this patch. Now I guess we need some qa experts to shed some
light on the mechanism of this unit test ...
I think the same way too. :)
Please someone correct [me/us] if [I'm/we are] wrong. I definitely have no
idea how unit tests written :) This patch written on hackathon to solve a
bug as Siqi said.
Tests are written according to the reversed start and end colors(Old code
which we changed). After our change at hackathon expected value is wrong
because test is written for the old code. So reversing the expected and
given HEX values to test should cause reversed values. So maybe it means
code is working as expected and the problem is test is written according to
reversed values(old code) ?
(Good luck to understand the paragraph above :))
Best,
--
Efe Gürkan YALAMAN
http://about.me/efegurkan
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.