summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextpiecetable
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-07-06 06:40:59 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-07-09 04:21:56 (GMT)
commit87df094ed204c237393eac1dd0b2fb907e642dcb (patch)
tree854385630599293e20bb2725ef786f278e6c2c7c /tests/auto/qtextpiecetable
parentbae8bc5d23946036b2c1079fc6f1b3bceeaa19ca (diff)
downloadQt-87df094ed204c237393eac1dd0b2fb907e642dcb.zip
Qt-87df094ed204c237393eac1dd0b2fb907e642dcb.tar.gz
Qt-87df094ed204c237393eac1dd0b2fb907e642dcb.tar.bz2
Disable private unit tests when Qt is configured without
-developer-build, part 2. Some autotests use private (unexported) code, either because they're testing private classes or because that's the easiest way to test the public classes. Configuring Qt with `-developer-build' is needed for these tests. This commit fixes the tests so configuring without `-developer-build' only builds the tests which strictly use public API.
Diffstat (limited to 'tests/auto/qtextpiecetable')
-rw-r--r--tests/auto/qtextpiecetable/qtextpiecetable.pro5
-rw-r--r--tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp32
2 files changed, 3 insertions, 34 deletions
diff --git a/tests/auto/qtextpiecetable/qtextpiecetable.pro b/tests/auto/qtextpiecetable/qtextpiecetable.pro
index 318a8c7..0926b83 100644
--- a/tests/auto/qtextpiecetable/qtextpiecetable.pro
+++ b/tests/auto/qtextpiecetable/qtextpiecetable.pro
@@ -2,7 +2,6 @@ load(qttest_p4)
SOURCES += tst_qtextpiecetable.cpp
HEADERS += ../qtextdocument/common.h
-!win32:DEFINES += QTEST_REDUCED_EXPORTS
-
-
+requires(!win32)
+requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp b/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp
index accbabb..0e60c16 100644
--- a/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp
+++ b/tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp
@@ -42,9 +42,7 @@
#include <QtTest/QtTest>
-#ifdef QTEST_REDUCED_EXPORTS
#define private public
-#endif
#include <qtextdocument.h>
#include <private/qtextdocument_p.h>
@@ -65,7 +63,6 @@ public:
tst_QTextPieceTable();
-#ifdef QTEST_REDUCED_EXPORTS
public slots:
void init();
void cleanup();
@@ -112,13 +109,7 @@ private slots:
void removeFrameDirect();
void removeWithChildFrame();
void clearWithFrames();
-#else
-public slots:
- void init();
- void cleanup();
-private slots:
- void skip();
-#endif
+
private:
QTextDocument *doc;
QTextDocumentPrivate *table;
@@ -130,8 +121,6 @@ tst_QTextPieceTable::tst_QTextPieceTable()
{ doc = 0; table = 0; }
-#ifdef QTEST_REDUCED_EXPORTS
-
void tst_QTextPieceTable::init()
{
doc = new QTextDocument(0);
@@ -1148,25 +1137,6 @@ void tst_QTextPieceTable::clearWithFrames()
QVERIFY(true);
}
-#else // QTEST_REDUCED_EXPORTS
-
-void tst_QTextPieceTable::init()
-{
-}
-
-void tst_QTextPieceTable::cleanup()
-{
-}
-
-void tst_QTextPieceTable::skip()
-{
- QSKIP( "Not tested on win32", SkipAll );
-}
-
-
-#endif // QTEST_REDUCED_EXPORTS
-
-
QTEST_MAIN(tst_QTextPieceTable)