on xenial help sign in
Re-enable disabled tests
79dab12Dalton Durst
plugins/Wizard/System.h+1−1
@@ -45,7 +45,7 @@ public:
45 * For example, if ::CURRENT_VERSION is 4, version 4 has not run, but the
45 * For example, if ::CURRENT_VERSION is 4, version 4 has not run, but the
46 * first-run wizard has run, this method will return 4
46 * first-run wizard has run, this method will return 4
47 */
47 */
48− signed int versionToShow() const;
48+ int versionToShow() const;
49
49
50 /**
50 /**
51 * The update version for the Wizard in this version of Unity8. Bump this
51 * The update version for the Wizard in this version of Unity8. Bump this
tests/plugins/Wizard/tst_system.cpp+17−17
@@ -118,7 +118,7 @@ void SystemTest::testUpdate()
118
118
119 System system;
119 System system;
120 QVERIFY(system.wizardEnabled());
120 QVERIFY(system.wizardEnabled());
121− QVERIFY(system.versionToShow() > 0);
121+ QVERIFY(system.versionToShow() == system.CURRENT_VERSION);
122
122
123 system.setWizardEnabled(false);
123 system.setWizardEnabled(false);
124 QVERIFY(!system.wizardEnabled());
124 QVERIFY(!system.wizardEnabled());
@@ -128,28 +128,28 @@ void SystemTest::testUpdate()
128
128
129void SystemTest::testNoticeChanges()
129void SystemTest::testNoticeChanges()
130{
130{
131− // enable();
131+ enable();
132
132
133− // System system;
133+ System system;
134− // QSignalSpy spy(&system, SIGNAL(wizardEnabledChanged()));
134+ QSignalSpy spy(&system, SIGNAL(wizardEnabledChanged()));
135
135
136− // // System only guarantees its signals work correcty when using its own set
136+ // System only guarantees its signals work correcty when using its own set
137− // // methods (i.e. it won't necessarily notice if we modify the file behind
137+ // methods (i.e. it won't necessarily notice if we modify the file behind
138− // // the scenes). This is because watching all parent directories of the
138+ // the scenes). This is because watching all parent directories of the
139− // // wizard-has-run file with QFileSystemWatcher is a nightmare and waste of
139+ // wizard-has-run file with QFileSystemWatcher is a nightmare and waste of
140− // // resources for the corner case it is. So we'll just test the set method.
140+ // resources for the corner case it is. So we'll just test the set method.
141
141
142− // system.setWizardEnabled(false);
142+ system.setWizardEnabled(false);
143− // QTRY_COMPARE(spy.count(), 1);
143+ QTRY_COMPARE(spy.count(), 1);
144
144
145− // system.setWizardEnabled(true);
145+ system.setWizardEnabled(true);
146− // QTRY_COMPARE(spy.count(), 2);
146+ QTRY_COMPARE(spy.count(), 2);
147
147
148− // system.setWizardEnabled(false);
148+ system.setWizardEnabled(false);
149− // QTRY_COMPARE(spy.count(), 3);
149+ QTRY_COMPARE(spy.count(), 3);
150
150
151− // system.setWizardEnabled(true);
151+ system.setWizardEnabled(true);
152− // QTRY_COMPARE(spy.count(), 4);
152+ QTRY_COMPARE(spy.count(), 4);
153}
153}
154
154
155QTEST_MAIN(SystemTest)
155QTEST_MAIN(SystemTest)