aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest/fuzzycompare/tst_FuzzyCompare.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmltest/fuzzycompare/tst_FuzzyCompare.qml')
-rw-r--r--tests/auto/qmltest/fuzzycompare/tst_FuzzyCompare.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qmltest/fuzzycompare/tst_FuzzyCompare.qml b/tests/auto/qmltest/fuzzycompare/tst_FuzzyCompare.qml
new file mode 100644
index 0000000000..6beb89f848
--- /dev/null
+++ b/tests/auto/qmltest/fuzzycompare/tst_FuzzyCompare.qml
@@ -0,0 +1,15 @@
+// Copyright (C) 2021 Alexander Akulich <akulichalexander@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+import QtTest 1.0
+
+TestCase {
+ name: "FuzzyCompare"
+
+ function test_differentColors()
+ {
+ const color1 = Qt.rgba(0, 0, 0, 0)
+ const color2 = Qt.rgba(1, 1, 1, 1)
+ expectFail("", "The colors are very different so fuzzyCompare should fail")
+ fuzzyCompare(color1, color2, 1)
+ }
+}