summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestcase.h')
-rw-r--r--src/testlib/qtestcase.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h
index b046232c65..25385b327a 100644
--- a/src/testlib/qtestcase.h
+++ b/src/testlib/qtestcase.h
@@ -143,9 +143,7 @@ do {\
if (!(expr)) { \
QTRY_LOOP_IMPL((expr), (2 * timeoutValue), step);\
if (expr) { \
- QString msg = QString::fromUtf8("QTestLib: This test case check (\"%1\") failed because the requested timeout (%2 ms) was too short, %3 ms would have been sufficient this time."); \
- msg = msg.arg(QString::fromUtf8(#expr)).arg(timeoutValue).arg(timeoutValue + qt_test_i); \
- QFAIL(qPrintable(msg)); \
+ QFAIL(qPrintable(QTest::Internal::formatTryTimeoutDebugMessage(u8"" #expr, timeoutValue, timeoutValue + qt_test_i))); \
} \
}
@@ -239,6 +237,8 @@ namespace QTest
{
namespace Internal {
+ Q_TESTLIB_EXPORT QString formatTryTimeoutDebugMessage(q_no_char8_t::QUtf8StringView expr, int timeout, int actual);
+
template<typename T> // Output registered enums
inline typename std::enable_if<QtPrivate::IsQEnumHelper<T>::Value, char*>::type toString(T e)
{