diff options
author | Charles Yin <charles.yin@nokia.com> | 2012-06-07 13:08:13 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-18 05:19:44 +0200 |
commit | 1ce3a17ef51e10c03627842b9cdd0bb543ee8c83 (patch) | |
tree | e1450d6230744cd51421574899fbc00bda7e6ac2 /tests/auto/qmltest/pixel/tst_pixel.qml | |
parent | 1fb66c77d55cfdbe5df9919cbe2f42ddde34fb22 (diff) |
Add fuzzyCompare() to qmltest
Change-Id: I4834f4af0839fb89424ed25f0addfb618e5374f8
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'tests/auto/qmltest/pixel/tst_pixel.qml')
-rw-r--r-- | tests/auto/qmltest/pixel/tst_pixel.qml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qmltest/pixel/tst_pixel.qml b/tests/auto/qmltest/pixel/tst_pixel.qml index d36bce21ab..f2a9d5fdb8 100644 --- a/tests/auto/qmltest/pixel/tst_pixel.qml +++ b/tests/auto/qmltest/pixel/tst_pixel.qml @@ -59,6 +59,10 @@ Rectangle { compare(img.blue(1,1), 0); compare(img.alpha(1,1), 255); + fuzzyCompare(img.red(1,1), 254, 2); + fuzzyCompare(img.pixel(1,1), Qt.rgba(254, 0, 0, 254), 2); + fuzzyCompare(img.pixel(1,1), "#FF0201", 2); + rect.color = "blue"; wait(200); img = grabImage(rect); |