diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-30 06:37:28 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-30 06:38:04 (GMT) |
commit | b9b305f6c7bc960101bfd883ca6e3df889483481 (patch) | |
tree | 2e7decae370a45b8c9123a2b48b47e3bb0ca232d /tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | |
parent | 1190f901cbcc62ab50c66bf0a7c41bfba923da7f (diff) | |
download | Qt-b9b305f6c7bc960101bfd883ca6e3df889483481.zip Qt-b9b305f6c7bc960101bfd883ca6e3df889483481.tar.gz Qt-b9b305f6c7bc960101bfd883ca6e3df889483481.tar.bz2 |
Correctly construct boolean JSValue's
Task-number: QTBUG-9205
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 2791722c..b218d30 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -128,6 +128,7 @@ private slots: void scriptDisconnect(); void ownership(); void qlistqobjectMethods(); + void strictlyEquals(); void bug1(); void dynamicCreationCrash(); @@ -2005,6 +2006,26 @@ void tst_qdeclarativeecmascript::qlistqobjectMethods() delete object; } +// QTBUG-9205 +void tst_qdeclarativeecmascript::strictlyEquals() +{ + QDeclarativeComponent component(&engine, TEST_FILE("strictlyEquals.qml")); + + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(object->property("test1").toBool(), true); + QCOMPARE(object->property("test2").toBool(), true); + QCOMPARE(object->property("test3").toBool(), true); + QCOMPARE(object->property("test4").toBool(), true); + QCOMPARE(object->property("test5").toBool(), true); + QCOMPARE(object->property("test6").toBool(), true); + QCOMPARE(object->property("test7").toBool(), true); + QCOMPARE(object->property("test8").toBool(), true); + + delete object; +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" |