summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qglobal/qglobal.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/global/qglobal/qglobal.c')
-rw-r--r--tests/auto/corelib/global/qglobal/qglobal.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qglobal/qglobal.c b/tests/auto/corelib/global/qglobal/qglobal.c
index 3b898de39f..2cfbd5e3be 100644
--- a/tests/auto/corelib/global/qglobal/qglobal.c
+++ b/tests/auto/corelib/global/qglobal/qglobal.c
@@ -1,7 +1,10 @@
// Copyright (C) 2017 Intel Corporation.
-// 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 <QtCore/qglobal.h>
+#include <QtCore/qtversion.h>
+#include <QtCore/qyieldcpu.h>
+#include <QtCore/qtypes.h>
#ifdef Q_COMPILER_THREAD_LOCAL
# include <threads.h>
@@ -12,6 +15,11 @@
* everything works.
*/
+#if defined(Q_OS_VXWORKS) && !defined(thread_local)
+// threads.h forgot to define this (should be fixed for version 23.11)
+# define thread_local _Thread_local
+#endif
+
/* Types and Q_UNUSED */
void tst_GlobalTypes()
{
@@ -43,8 +51,20 @@ void tst_GlobalTypes()
qintptr qip;
quintptr qup;
Q_UNUSED(qs); Q_UNUSED(qp); Q_UNUSED(qip); Q_UNUSED(qup);
+
+#ifdef QT_SUPPORTS_INT128
+ qint128 s128;
+ quint128 u128;
+ Q_UNUSED(s128); Q_UNUSED(u128);
+#endif /* QT_SUPPORTS_INT128 */
}
+#if QT_SUPPORTS_INT128
+qint128 tst_qint128_min() { return Q_INT128_MIN + 0; }
+qint128 tst_qint128_max() { return 0 + Q_INT128_MAX; }
+quint128 tst_quint128_max() { return Q_UINT128_MAX - 1 + 1; }
+#endif
+
/* Qt version */
int tst_QtVersion()
{
@@ -61,6 +81,12 @@ const char *tst_qVersion()
#endif
}
+void tst_qYieldCpu(void) Q_DECL_NOEXCEPT;
+void tst_qYieldCpu(void)
+{
+ qYieldCpu();
+}
+
/* Static assertion */
Q_STATIC_ASSERT(true);
Q_STATIC_ASSERT(1);