diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-07-13 12:01:45 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-07-16 15:30:30 +0000 |
commit | 88867e39bc952586aec7648615f3cbebb8869ba3 (patch) | |
tree | 03d788d9f65aef8b311b2b5740f6dd8f6da49473 /src/testlib/doc | |
parent | ff78e6fe352ac6806f930fc12e3d11b49b766316 (diff) |
testlib: Move qtestsystem helpers to their respective modules
Having the helpers in each respective module lets us implement the
helpers using private APIs without forcing the test to add private
dependencies.
It also makes it easier to test Qt using a third party testing
framework (for running the test suite), while still using the helpers
for ensuring tests behave expectedly.
Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/testlib/doc')
-rw-r--r-- | src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp index 990b7a38d7..202f87af52 100644 --- a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp +++ b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp @@ -177,13 +177,6 @@ namespace MyNamespace { } //! [toString-overload] -//! [17] -int i = 0; -while (myNetworkServerNotResponding() && i++ < 50) - QTest::qWait(250); -//! [17] - - //! [18] MyTestObject test1; QTest::qExec(&test1); @@ -245,11 +238,6 @@ void MyTestClass::cleanup() QTest::qSleep(250); //! [23] -//! [24] -QWidget widget; -widget.show(); -QTest::qWaitForWindowShown(&widget); -//! [24] //! [25] QTouchDevice *dev = QTest::createTouchDevice(); @@ -306,13 +294,5 @@ QTest::keyClick(myWindow, Qt::Key_Escape); QTest::keyClick(myWindow, Qt::Key_Escape, Qt::ShiftModifier, 200); //! [29] -//! [30] -MyObject obj; -obj.startup(); -QTest::qWaitFor([&]() { - return obj.isReady(); -}, 3000); -//! [30] - } |