For both QTestLog::addFail() and QTestLog::addIgnoreMessage(), passing
a null message does not make sense and is therefore an error that
should be brought to the developer's attention.
Change-Id: Ib09ad90b70d74f7432c08708db8a70dee008cce4
Reviewed-on: http://codereview.qt.nokia.com/3470
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
void QTestLog::addFail(const char *msg, const char *file, int line)
{
QTEST_ASSERT(QTest::testLogger);
+ QTEST_ASSERT(msg);
QTest::testLogger->addIncident(QAbstractTestLogger::Fail, msg, file, line);
}
void QTestLog::addIgnoreMessage(QtMsgType type, const char *msg)
{
+ QTEST_ASSERT(msg);
+
QTest::IgnoreResultList *item = new QTest::IgnoreResultList(type, msg);
QTest::IgnoreResultList *list = QTest::ignoreResultList;