summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-06-17 17:07:45 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-06-17 17:13:22 +0200
commite6f7cc96fa09b50c17bc5f4645b06c30145a3f55 (patch)
tree2a0381bc3b95a61ed175ad4896ff017513292e77 /tests/auto/corelib/global
parenteed85dc3e72c56caaa65dd4ec27ef6892ca1ffae (diff)
Use C++11 alignof as reference for Q_ALIGNOF, and fix test on Android
Not removing QT_EMULATED_ALIGNOF logic from qglobal.h at this point, as it might be used elsewhere. Change-Id: Ie78922bb604a54aed03ab5b88e31a7f29a3a4de0 Fixes: QTBUG-73561 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 56da047147..7800a101ec 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -468,7 +468,7 @@ typedef int (Empty::*memFun) ();
QCOMPARE(Q_ALIGNOF(type), size_t(alignment)); \
/* Compare to native operator for compilers that support it,
otherwise... erm... check consistency! :-) */ \
- QCOMPARE(QT_EMULATED_ALIGNOF(type), Q_ALIGNOF(type)); \
+ QCOMPARE(alignof(type), Q_ALIGNOF(type)); \
} while (false)
/**/
@@ -521,7 +521,7 @@ void tst_QGlobal::qAlignOf()
TEST_AlignOf_impl(AlignmentInStruct<double>, Q_ALIGNOF(AlignmentInStruct<qint64>));
// 32-bit x86 ABI, Clang disagrees with gcc
-#if !defined(Q_PROCESSOR_X86_32) || !defined(Q_CC_CLANG)
+#if !defined(Q_PROCESSOR_X86_32) || !defined(Q_CC_CLANG) || defined(Q_OS_ANDROID)
TEST_AlignOf_impl(qint64 [5], Q_ALIGNOF(qint64));
#else
TEST_AlignOf_impl(qint64 [5], Q_ALIGNOF(AlignmentInStruct<qint64>));