summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 3ca5496..c7b2c17 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -297,6 +297,7 @@ void QTestLog::stopLogging()
void QTestLog::warn(const char *msg)
{
+ QTEST_ASSERT(QTest::testLogger);
QTEST_ASSERT(msg);
QTest::testLogger->addMessage(QAbstractTestLogger::Warn, msg);
@@ -304,9 +305,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);
}