Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.7.1, 5.8.0 Beta
-
None
-
Debian GNU/Linux sid (several architectures, I used ppc64 for tests)
-
4aabede9348d195cec2ca6c4718576aa35464e3e
Description
If my test case has this line: verify(0 == -0), then I get a test failure.
This seems to happen on several architectures in Debian. My guess is that it happens on architectures which do not support JIT (we have many of them). This is not an endianness issue, because it happens also on ppc64 (big endian).
This also happens in qtdeclarative testsuite (flick.contentX is equal to -0 in that test):
FAIL! : qmltest::WheelEvents::test_wheel() 'verify()' returned FALSE. () Loc: [/«PKGBUILDDIR»/tests/auto/qmltest/events/tst_wheel.qml(64)]
Using compare() is fine, because for numbers it does fuzzy comparing.
I did not find where the C++ code for comparing V4 values is, if someone points it to me I will try to do some more debugging (cc erikv).
Attachments
For Gerrit Dashboard: QTBUG-56808 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
187786,2 | JS: Fix 0 == -0 | 5.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |