summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-12-23 15:35:32 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-25 20:19:46 +0100
commitbca775edaa22f383f319aae72799b6cb61bce48c (patch)
tree546276954d76305bfd67e1085376c1ab55fd96e8 /tests/auto
parentf4c7bbba13f9bdf1ce11334090079a4735684d69 (diff)
Improve QSettings autotest
QTestLib-based autotests cannot perform verification steps in the test class constructor. This needs to be done in initTestCase() instead. Change-Id: Ib1f7f838f052fa0fc5104603bdac01ffd8313aef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 2c96339737..58e0b4f5b4 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -73,10 +73,8 @@ class tst_QSettings : public QObject
{
Q_OBJECT
-public:
- tst_QSettings();
-
public slots:
+ void initTestCase();
void init();
void cleanup();
private slots:
@@ -270,7 +268,7 @@ static void populateWithFormats()
QTest::newRow("custom2") << QSettings::CustomFormat2;
}
-tst_QSettings::tst_QSettings()
+void tst_QSettings::initTestCase()
{
QSettings::Format custom1 = QSettings::registerFormat("custom1", readCustom1File, writeCustom1File);
QSettings::Format custom2 = QSettings::registerFormat("custom2", readCustom2File, writeCustom2File