summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/global/qlogging/tst_qlogging.cpp')
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 665da3ff22..defe3ac421 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -1,7 +1,7 @@
// Copyright (C) 2022 The Qt Company Ltd.
// Copyright (C) 2022 Intel Corporation.
// Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <qdebug.h>
#include <qglobal.h>
@@ -625,6 +625,14 @@ void tst_qmessagehandler::cleanupFuncinfo_data()
<< "void `void function<Polymorphic<void __cdecl(int *)> >(void)'::`2'::S::f(Polymorphic<void __cdecl(int *)> *)"
<< "function(void)'::`2'::S::f";
+ QTest::newRow("gcc_lambda_1") << "main(int, char**)::<lambda()>"
+ << "main(int, char**)::<lambda()>";
+
+ QTest::newRow("gcc_lambda_with_auto_1")
+ << "SomeClass::someMethod(const QString&, const QString&)::<lambda(auto:57)> [with "
+ "auto:57 = QNetworkReply::NetworkError]"
+ << "SomeClass::someMethod(const QString&, const QString&)::<lambda(auto:57)>";
+
QTest::newRow("objc_1")
<< "-[SomeClass someMethod:withArguments:]"
<< "-[SomeClass someMethod:withArguments:]";
@@ -794,6 +802,10 @@ void tst_qmessagehandler::qMessagePattern_data()
#ifdef __GLIBC__
# if QT_CONFIG(static)
// These test cases don't work with static Qt builds
+# elif !defined(Q_PROCESSOR_X86)
+ // On most RISC platforms, call frames do not have to be stored to the
+ // stack (the return pointer may be saved in any callee-saved register), so
+ // this test isn't reliable.
# elif defined(QT_ASAN_ENABLED)
// These tests produce far more call frames under ASan
# else
@@ -804,10 +816,9 @@ void tst_qmessagehandler::qMessagePattern_data()
"[MyClass::myFunction|MyClass::mySlot1|?" BACKTRACE_HELPER_NAME "?|",
// QMetaObject::invokeMethodImpl calls internal function
- // (QMetaMethodPrivate::invokeImpl, at the tims of this writing), which
+ // (QMetaMethodPrivate::invokeImpl, at the time of this writing), which
// will usually show only as ?libQt6Core.so? or equivalent, so we skip
- // end of backtrace, actual message
"|" QT_NAMESPACE_STR "QMetaObject::invokeMethodImpl] from_a_function 34"
};
QTest::newRow("backtrace") << "[%{backtrace}] %{message}" << true << expectedBacktrace;
@@ -975,11 +986,9 @@ QString tst_qmessagehandler::backtraceHelperPath()
#ifdef Q_OS_ANDROID
QString appExe(QCoreApplication::applicationDirPath()
+ QLatin1String("/lib" BACKTRACE_HELPER_NAME ".so"));
-#elif defined(Q_OS_WEBOS)
+#else
QString appExe(QCoreApplication::applicationDirPath()
+ QLatin1String("/" BACKTRACE_HELPER_NAME));
-#else
- QString appExe(QLatin1String(HELPER_BINARY));
#endif
return appExe;
}