summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwizard/tst_qwizard.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-20 19:45:38 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-20 19:46:19 +0200
commitd671acd5b296b83440db9836a92189c501c87ff3 (patch)
treebd9c1a000e17c70124c207666cfb3276b5518ffd /tests/auto/qwizard/tst_qwizard.cpp
parent42f5786104f9eef9542df2c7469a03324978281d (diff)
parent4f2138ecfbdc58e5cb5b0c7d762197ef69752957 (diff)
Merge remote branch 'staging/master' into refactor
Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/glxconvenience/qglxconvenience.cpp src/plugins/platforms/platforms.pro src/plugins/platforms/wayland/qwaylandwindow.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/plugins/platforms/xcb/qxcbwindowsurface.cpp src/widgets/kernel/qwidget_qpa.cpp tests/auto/qvariant/tst_qvariant.cpp
Diffstat (limited to 'tests/auto/qwizard/tst_qwizard.cpp')
-rw-r--r--tests/auto/qwizard/tst_qwizard.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/qwizard/tst_qwizard.cpp b/tests/auto/qwizard/tst_qwizard.cpp
index 5667d4047a..00b59a923b 100644
--- a/tests/auto/qwizard/tst_qwizard.cpp
+++ b/tests/auto/qwizard/tst_qwizard.cpp
@@ -854,25 +854,26 @@ struct MyPage2 : public QWizardPage
public:
MyPage2() : init(0), cleanup(0), validate(0) {}
- void initializePage() { ++init; QWizardPage::initializePage(); checkInvariant(); }
- void cleanupPage() { ++cleanup; QWizardPage::cleanupPage(); checkInvariant(); }
+ void initializePage() { ++init; QWizardPage::initializePage(); }
+ void cleanupPage() { ++cleanup; QWizardPage::cleanupPage(); }
bool validatePage() { ++validate; return QWizardPage::validatePage(); }
- void check(int init, int cleanup)
- { Q_ASSERT(init == this->init && cleanup == this->cleanup); Q_UNUSED(init); Q_UNUSED(cleanup); }
+ bool check(int init, int cleanup)
+ {
+ return init == this->init
+ && cleanup == this->cleanup
+ && (this->init == this->cleanup || this->init - 1 == this->cleanup);
+ }
int init;
int cleanup;
int validate;
-
-private:
- void checkInvariant() { Q_ASSERT(init == cleanup || init - 1 == cleanup); }
};
#define CHECK_PAGE_INIT(i0, c0, i1, c1, i2, c2) \
- page0->check((i0), (c0)); \
- page1->check((i1), (c1)); \
- page2->check((i2), (c2));
+ QVERIFY(page0->check((i0), (c0))); \
+ QVERIFY(page1->check((i1), (c1))); \
+ QVERIFY(page2->check((i2), (c2)));
void tst_QWizard::setOption_IndependentPages()
{