summaryrefslogtreecommitdiffstats
path: root/src/testlib/qplaintestlogger_p.h
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-08-25 18:20:19 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-29 03:45:35 +0200
commite8e9b62f725f2229ae9e6d0218bbcbf7d54425ee (patch)
treebb79546be6e68ed1a53a05cae1d1e6ceb317f719 /src/testlib/qplaintestlogger_p.h
parentdc7b2b8d9ca1d394d8338ce1c1f51eafac187908 (diff)
Enable multiple instances of QAbstractTestLogger.
Previously QAbstractTestLogger used a global variable for the file pointer to which it was writing test output. This effectively meant that only one instance of this or its derived classes could exist at any time. This commit moves the file pointer inside the class, so that multiple loggers can exist at the same time. This means that the outputString() method can no longer be static, which in turn means that several functions used by QPlainTestLogger need to move from the QTest namespace into the class, and also that QTestBasicStreamer must hold a non-const pointer to its associated logger instead of a const pointer. Task-number: QTBUG-20615 Change-Id: If941f1f9399cf20fb93e3e87f3390bceeca1cbfc Reviewed-on: http://codereview.qt.nokia.com/3576 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/testlib/qplaintestlogger_p.h')
-rw-r--r--src/testlib/qplaintestlogger_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testlib/qplaintestlogger_p.h b/src/testlib/qplaintestlogger_p.h
index 1784e3be77..5fa33e6b51 100644
--- a/src/testlib/qplaintestlogger_p.h
+++ b/src/testlib/qplaintestlogger_p.h
@@ -79,6 +79,10 @@ public:
private:
unsigned int randomSeed;
bool hasRandomSeed;
+
+ void printMessage(const char *type, const char *msg, const char *file = 0, int line = 0);
+ void outputMessage(const char *str);
+ void printBenchmarkResult(const QBenchmarkResult &result);
};
QT_END_NAMESPACE