diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-03 08:48:04 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-03 08:50:52 +0900 |
commit | eb2e1ab4651350bffc53f618961a910bd3bbcfd9 (patch) | |
tree | f7b112110af698ddd468af1332bb56278b2dae4c /tools | |
parent | bf1498a15b1c3105f5ab38896f6d98c3f1729be9 (diff) |
Report reference color and expected color if test fails
Change-Id: I7c8110b31171b247bcd46cee02f41972f59cbdcc
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qa/cppunit/test_color.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/qa/cppunit/test_color.cxx b/tools/qa/cppunit/test_color.cxx index 8639ebe9fb62..a1847df716db 100644 --- a/tools/qa/cppunit/test_color.cxx +++ b/tools/qa/cppunit/test_color.cxx @@ -82,9 +82,20 @@ bool checkTintShade(sal_uInt8 nR, sal_uInt8 nG, sal_uInt8 nB, OUString const & s { Color aColor(nR, nG, nB); if (sReference != aColor.AsRGBHexString()) + { + fprintf(stderr, "FAILED: Input and reference color mismatch %s\n", + sReference.toUtf8().getStr()); return false; + } aColor.ApplyTintOrShade(nTintShade); - return sExpected == aColor.AsRGBHexString(); + if (sExpected != aColor.AsRGBHexString()) + { + fprintf(stderr, "FAILED: Reference color is %s which differs from expect %s\n", + sReference.toUtf8().getStr(), + sExpected.toUtf8().getStr()); + return false; + } + return true; } void Test::test_ApplyTintOrShade() |