summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/network/kernel/qhostinfo/main.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/tests/benchmarks/network/kernel/qhostinfo/main.cpp b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
index ebdea5e..f4648d6 100644
--- a/tests/benchmarks/network/kernel/qhostinfo/main.cpp
+++ b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
@@ -54,9 +54,9 @@ class tst_qhostinfo : public QObject
{
Q_OBJECT
public slots:
- void initTestCase();
void init();
private slots:
+ void lookupSpeed_data();
void lookupSpeed();
};
@@ -75,28 +75,23 @@ public slots:
}
};
-void tst_qhostinfo::initTestCase()
-{
- // run each testcase with and without cache enabled
- QTest::addColumn<bool>("cache");
- QTest::newRow("WithCache") << true;
- QTest::newRow("WithoutCache") << false;
-}
-
void tst_qhostinfo::init()
{
// delete the cache so inidividual testcase results are independant from each other
qt_qhostinfo_clear_cache();
-
- QFETCH_GLOBAL(bool, cache);
- qt_qhostinfo_enable_cache(cache);
}
+void tst_qhostinfo::lookupSpeed_data()
+{
+ QTest::addColumn<bool>("cache");
+ QTest::newRow("WithCache") << true;
+ QTest::newRow("WithoutCache") << false;
+}
void tst_qhostinfo::lookupSpeed()
{
- QFETCH_GLOBAL(bool, cache);
- qDebug() << "Cache enabled:" << cache;
+ QFETCH(bool, cache);
+ qt_qhostinfo_enable_cache(cache);
QStringList hostnameList;
hostnameList << "www.ovi.com" << "www.nokia.com" << "qt.nokia.com" << "www.trolltech.com" << "troll.no"