summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp')
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index 78bb2247cb..204758f68a 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -30,6 +30,7 @@
#include <QtCore/QCoreApplication>
#include <QtTest/QtTest>
#ifdef QT_GUI_LIB
+#include <QtGui/QColor>
#include <QtGui/QImage>
#include <QtGui/QPixmap>
#endif
@@ -135,6 +136,7 @@ private slots:
void compareQListInt();
void compareQListDouble();
#ifdef QT_GUI_LIB
+ void compareQColor();
void compareQPixmaps();
void compareQPixmaps_data();
void compareQImages();
@@ -346,6 +348,15 @@ void tst_Cmptest::compareQListDouble()
}
#ifdef QT_GUI_LIB
+void tst_Cmptest::compareQColor()
+{
+ const QColor yellow(Qt::yellow);
+ const QColor yellowFromName(QStringLiteral("yellow"));
+ const QColor green(Qt::green);
+ QCOMPARE(yellow, yellowFromName);
+ QCOMPARE(yellow, green);
+}
+
void tst_Cmptest::compareQPixmaps_data()
{
QTest::addColumn<QPixmap>("opA");