diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-12 07:02:14 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-12 07:02:14 (GMT) |
commit | 01fbf55727678509f87523ef2ddda1d21d4ac2ab (patch) | |
tree | fc35b33603c028ecbb378c3163676bef2cd8132e /tests/auto/declarative/qdeclarativelanguage | |
parent | 9a45f780a24625f8f1104a6e2442f00874ab296f (diff) | |
download | Qt-01fbf55727678509f87523ef2ddda1d21d4ac2ab.zip Qt-01fbf55727678509f87523ef2ddda1d21d4ac2ab.tar.gz Qt-01fbf55727678509f87523ef2ddda1d21d4ac2ab.tar.bz2 |
Correctly assign bool to variant properties
QTBUG-10623
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage')
-rw-r--r-- | tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml index 5af3d6e..bac704e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml @@ -10,5 +10,7 @@ QtObject { property variant test7: "10x10" property variant test8: "100,100,100" property variant test9: String("#FF008800") + property variant test10: true + property variant test11: false } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index ff03005..6b070f5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -536,6 +536,8 @@ void tst_qdeclarativelanguage::assignLiteralToVariant() QCOMPARE(object->property("test7").userType(), (int)QVariant::SizeF); QCOMPARE(object->property("test8").userType(), (int)QVariant::Vector3D); QCOMPARE(object->property("test9").userType(), (int)QVariant::String); + QCOMPARE(object->property("test10").userType(), (int)QVariant::Bool); + QCOMPARE(object->property("test11").userType(), (int)QVariant::Bool); QVERIFY(object->property("test1") == QVariant(1)); QVERIFY(object->property("test2") == QVariant((double)1.7)); @@ -546,6 +548,8 @@ void tst_qdeclarativelanguage::assignLiteralToVariant() QVERIFY(object->property("test7") == QVariant(QSizeF(10, 10))); QVERIFY(object->property("test8") == QVariant(QVector3D(100, 100, 100))); QVERIFY(object->property("test9") == QVariant(QString(QLatin1String("#FF008800")))); + QVERIFY(object->property("test10") == QVariant(bool(true))); + QVERIFY(object->property("test11") == QVariant(bool(false))); delete object; } |