summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstringbuilder/qstringbuilder3
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-06-04 02:24:19 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-06-04 15:58:02 +0200
commit77a8005dcb12a274193c8009df03e84ff6b51582 (patch)
tree3fc84bc73aebf69d0324e3082d6b9daaf0a836bb /tests/auto/corelib/text/qstringbuilder/qstringbuilder3
parentc2085c26cf868d3dd0deb37cef525d95a0175256 (diff)
QStringBuilder: code tidies in the tests
Including other headers, while defining very questionable macro names, can and will result in trouble. Stop doing that. While at it, move from including <QtTest> to include-what-you-use, and clean up the code a bit. Change-Id: Idb02ef2b612c0805baecac3ce6edd435609aca4c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qstringbuilder/qstringbuilder3')
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
index 397e3326bf..6559168cbd 100644
--- a/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
@@ -30,13 +30,14 @@
// SCENARIO 3
// this is the "no harm done" version. Only operator% is active,
// with NO_CAST * _not_ defined
-#define P %
#undef QT_USE_QSTRINGBUILDER
#undef QT_NO_CAST_FROM_ASCII
#undef QT_NO_CAST_TO_ASCII
-
-#include <QtTest/QtTest>
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <QtCore/QStringBuilder>
+#include <QtTest/QTest>
#define LITERAL "some literal"
@@ -50,7 +51,10 @@ private slots:
void scenario() { runScenario(); }
};
+#define P %
#include "../qstringbuilder1/stringbuilder.cpp"
+#undef P
+
#include "tst_qstringbuilder3.moc"
QTEST_APPLESS_MAIN(tst_QStringBuilder3)