Test failure

Efe Gürkan YALAMAN efeyalaman at gmail.com
Tue Oct 8 13:23:21 PDT 2013


2013/10/8 Siqi Liu <me at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20131008/efcc4765/attachment.html>


More information about the LibreOffice mailing list