summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-17 17:04:39 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-19 05:56:55 +0200
commit757b0529c42690988f565ca03194900c4d1289f8 (patch)
tree9da3f742a0fdfd85916d9f5fe30b320f14b7e9f0 /src
parent604619fc386c852fef1158d6cd2b0ccfc94eef71 (diff)
Remove QTEST_NOOP_MAIN from qtestlib API.
This macro is no longer used in Qt's tests and encourages writing tests in a way that makes test reporting less accurate -- remove it to prevent further misuse. If a test can be determined at compile-time to be inapplicable, it should be omitted from the build via .pro file logic. If that is not possible (e.g. there is no suitable qmake variable), the test's initTestCase() function should call QSKIP to skip the entire test with a meaningful explanation. Task-number: QTBUG-21851 Change-Id: Icacc8c5567a700191b6ef3fa94ee52ede94c5b34 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/testlib/qtest.h7
-rw-r--r--src/testlib/qtestcase.cpp13
2 files changed, 0 insertions, 20 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 66e747a2ac..35ab5a31e8 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -238,13 +238,6 @@ int main(int argc, char *argv[]) \
return QTest::qExec(&tc, argc, argv); \
}
-#define QTEST_NOOP_MAIN \
-int main(int argc, char *argv[]) \
-{ \
- QObject tc; \
- return QTest::qExec(&tc, argc, argv); \
-}
-
#include <QtTest/qtestsystem.h>
#if defined(QT_WIDGETS_LIB)
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 41bdd9b62a..c579e0f11f 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -326,19 +326,6 @@ QT_BEGIN_NAMESPACE
\sa QTEST_MAIN()
*/
-/*! \macro QTEST_NOOP_MAIN()
-
- \relates QTest
-
- Implements a main() function with a test class that does absolutely nothing.
- Use this macro to create a test that produces valid test output but just
- doesn't execute any test, for example in conditional compilations:
-
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 12
-
- \sa QTEST_MAIN()
-*/
-
/*! \macro QTEST_GUILESS_MAIN(TestClass)
\relates QTest