QPlainTestLogger: code tidies
Remove a couple of unnecessary string literals that only coped with an impossible situation (default return after a switch that cover all the enumerators). Add a Q_UNREACHABLE() for good measure. Change-Id: I8065218554edf98408d9c0823b8c301932681c59 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
d98b43005e
commit
64e33727bb
@ -96,7 +96,8 @@ namespace QTest {
|
||||
case QAbstractTestLogger::BlacklistedXFail:
|
||||
return "BXFAIL ";
|
||||
}
|
||||
return "??????";
|
||||
Q_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static const char *benchmarkResult2String()
|
||||
@ -122,7 +123,8 @@ namespace QTest {
|
||||
case QAbstractTestLogger::Warn:
|
||||
return "WARNING";
|
||||
}
|
||||
return "??????";
|
||||
Q_UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user