summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-09-24 03:56:43 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-09-24 03:56:43 (GMT)
commit5536a86fdfc8e68c8541c0a9bb8fc20ccae3877f (patch)
tree5dcf13a6f03c64902aa3c657f368300941964834 /tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
parentbbf8b8ee6cb202acc654b7a8aa85cb6c63460842 (diff)
downloadQt-5536a86fdfc8e68c8541c0a9bb8fc20ccae3877f.zip
Qt-5536a86fdfc8e68c8541c0a9bb8fc20ccae3877f.tar.gz
Qt-5536a86fdfc8e68c8541c0a9bb8fc20ccae3877f.tar.bz2
More declarative autotests.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 895ee6c..739b10a 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -50,6 +50,7 @@
#include <QVector3D>
#include <QCryptographicHash>
#include <QDeclarativeItem>
+#include <QSignalSpy>
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
@@ -84,6 +85,7 @@ private slots:
void btoa();
void atob();
void fontFamilies();
+ void quit();
private:
QDeclarativeEngine engine;
@@ -518,6 +520,18 @@ void tst_qdeclarativeqt::fontFamilies()
delete object;
}
+void tst_qdeclarativeqt::quit()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("quit.qml"));
+
+ QSignalSpy spy(&engine, SIGNAL(quit()));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QCOMPARE(spy.count(), 1);
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeqt)
#include "tst_qdeclarativeqt.moc"