diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2017-10-03 10:10:46 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-11-03 14:29:49 +0000 |
commit | c988a8a28214914d20f4b8858e7f314a51b27507 (patch) | |
tree | 41c634e80f3e849eb913225e84b01165852c8f8d /src/testlib/qxunittestlogger.cpp | |
parent | 58f46077015fc5dd71543ca25f762ff34fc12621 (diff) |
Make QCOMPARE print QColor alpha values on failure
Currently, when two colors are equal except for their alpha values,
QCOMPARE produces the following failure message:
FAIL! : tst_Test::test() Compared values are not the same
Actual (colorA): #ff0000
Expected (colorB): #ff0000
By using the HexArgb format instead of the default HexRgb, we can
see the full hex string, with alpha values included:
FAIL! : tst_Test::test() Compared values are not the same
Actual (colorA): #88ff0000
Expected (colorB): #ffff0000
Task-number: QTBUG-55574
Change-Id: Id82c60a1b473ac6025a6f6ac560fce95a910d782
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/testlib/qxunittestlogger.cpp')
0 files changed, 0 insertions, 0 deletions