summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativefontloader
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-04-12 04:53:36 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-04-12 05:38:20 (GMT)
commit3475168550c1a804f04f2a4edfeb30c04cd36551 (patch)
treeec1587bdc87e6f554c31e09cb1a3a2e26f16b181 /tests/auto/declarative/qdeclarativefontloader
parent78722d6b6e9ba0f6de1a4eba232aad2f96a339f2 (diff)
downloadQt-3475168550c1a804f04f2a4edfeb30c04cd36551.zip
Qt-3475168550c1a804f04f2a4edfeb30c04cd36551.tar.gz
Qt-3475168550c1a804f04f2a4edfeb30c04cd36551.tar.bz2
Reduce usage of Q_ASSERT in autotests.
Using Q_ASSERT does nothing in release-mode builds, and in debug builds it causes tests to terminate prematurely. It is much better to use QVERIFY or QCOMPARE. Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/declarative/qdeclarativefontloader')
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
index e684bbe..2f0992c 100644
--- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -55,13 +55,13 @@
#endif
class tst_qdeclarativefontloader : public QObject
-
{
Q_OBJECT
public:
tst_qdeclarativefontloader();
private slots:
+ void init();
void noFont();
void namedFont();
void localFont();
@@ -71,8 +71,6 @@ private slots:
void failWebFont();
void changeFont();
-private slots:
-
private:
QDeclarativeEngine engine;
TestHTTPServer server;
@@ -82,7 +80,11 @@ tst_qdeclarativefontloader::tst_qdeclarativefontloader() :
server(SERVER_PORT)
{
server.serveDirectory(SRCDIR "/data");
- Q_ASSERT(server.isValid());
+}
+
+void tst_qdeclarativefontloader::init()
+{
+ QVERIFY(server.isValid());
}
void tst_qdeclarativefontloader::noFont()