diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-16 04:51:12 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-16 04:51:12 (GMT) |
commit | 341d12b9cbe7d516d32b8409def7193058aef33c (patch) | |
tree | 0053b6cdc1a93d8f080fd9a996ddce6455b4af99 /tests | |
parent | 8dd06a3d0bfda60cbd84677d62f9f4929ccf6394 (diff) | |
parent | d51de46fe6d52126c57623156a5c7e4ed61a51a7 (diff) | |
download | Qt-341d12b9cbe7d516d32b8409def7193058aef33c.zip Qt-341d12b9cbe7d516d32b8409def7193058aef33c.tar.gz Qt-341d12b9cbe7d516d32b8409def7193058aef33c.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlqt/data/darker.qml | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qmlqt/data/lighter.qml | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qmlqt/tst_qmlqt.cpp | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlqt/data/darker.qml b/tests/auto/declarative/qmlqt/data/darker.qml index 6369e8f..96ffa77 100644 --- a/tests/auto/declarative/qmlqt/data/darker.qml +++ b/tests/auto/declarative/qmlqt/data/darker.qml @@ -4,5 +4,8 @@ Object { property var test1: Qt.darker(Qt.rgba(1, 0.8, 0.3)) property var test2: Qt.darker() property var test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 10) + property var test4: Qt.darker("red"); + property var test5: Qt.darker("perfectred"); // Non-existant color + property var test6: Qt.darker(10); } diff --git a/tests/auto/declarative/qmlqt/data/lighter.qml b/tests/auto/declarative/qmlqt/data/lighter.qml index 6c888e7..2e9fdc8 100644 --- a/tests/auto/declarative/qmlqt/data/lighter.qml +++ b/tests/auto/declarative/qmlqt/data/lighter.qml @@ -4,4 +4,7 @@ Object { property var test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3)) property var test2: Qt.lighter() property var test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 10) + property var test4: Qt.lighter("red"); + property var test5: Qt.lighter("perfectred"); // Non-existant color + property var test6: Qt.lighter(10); } diff --git a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp index 13f4904..4d09aee 100644 --- a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp +++ b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp @@ -213,6 +213,9 @@ void tst_qmlqt::lighter() QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).lighter()); QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor()); QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").lighter()); + QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor()); delete object; } @@ -226,6 +229,9 @@ void tst_qmlqt::darker() QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).darker()); QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor()); QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").darker()); + QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor()); + QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor()); delete object; } |