diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-06-25 03:22:08 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-06-25 03:22:08 (GMT) |
commit | 5272bfe03522e671e832a8cbd9e5b2d4d71a18f2 (patch) | |
tree | 815d008b71de7ac5f381745f1d399ca4f0441626 /tests/auto/declarative | |
parent | 2426502f372f1c1a33ccaba3549dc0eda2a754de (diff) | |
download | Qt-5272bfe03522e671e832a8cbd9e5b2d4d71a18f2.zip Qt-5272bfe03522e671e832a8cbd9e5b2d4d71a18f2.tar.gz Qt-5272bfe03522e671e832a8cbd9e5b2d4d71a18f2.tar.bz2 |
Fix assert
QTBUG-11600
Diffstat (limited to 'tests/auto/declarative')
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.js b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.js new file mode 100644 index 0000000..092bc2b --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.js @@ -0,0 +1 @@ +; diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml new file mode 100644 index 0000000..56e7885 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml @@ -0,0 +1,8 @@ +import Qt 4.7 +import "qtbug_11600.js" as Test + +QtObject { + id: goo + + property bool test: undefined == goo.Test.foo +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 7e8a272..5619f22 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -156,6 +156,7 @@ private slots: void function(); void qtbug_10696(); void qtbug_11606(); + void qtbug_11600(); void include(); @@ -2513,6 +2514,16 @@ void tst_qdeclarativeecmascript::qtbug_11606() delete o; } +void tst_qdeclarativeecmascript::qtbug_11600() +{ + QDeclarativeComponent component(&engine, TEST_FILE("qtbug_11600.qml")); + QObject *o = component.create(); + QVERIFY(o != 0); + QCOMPARE(o->property("test").toBool(), true); + delete o; +} + + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" |