summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestlog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestlog.cpp')
-rw-r--r--src/testlib/qtestlog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 130b565..c9322e9 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -309,6 +309,7 @@ void QTestLog::stopLogging()
void QTestLog::warn(const char *msg)
{
+ QTEST_ASSERT(QTest::testLogger);
QTEST_ASSERT(msg);
QTest::testLogger->addMessage(QAbstractTestLogger::Warn, msg);
@@ -316,9 +317,10 @@ void QTestLog::warn(const char *msg)
void QTestLog::info(const char *msg, const char *file, int line)
{
+ QTEST_ASSERT(QTest::testLogger);
QTEST_ASSERT(msg);
+ QTEST_ASSERT(file);
- if (QTest::testLogger)
QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line);
}