diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-06-24 09:23:47 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-07-06 17:56:58 +0200 |
commit | 0587d4752d8fb814d47a599130d98724d78b1525 (patch) | |
tree | 41199b3cc239c15297e3028a7c23640d3fff5d52 /tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp | |
parent | c0385f0cee52a5bb17e95cbdedda3dbff5f60b53 (diff) |
Remove uses of Q_ATOMIC_INT{8,16,32}_IS_SUPPORTED
It's always true these days, assert so in qatomic.cpp and
tst_QAtomicInteger.
Update the docs.
Pick-to: 6.4
Change-Id: I3684cff96c1d2e05677314e29514cc279bd6b1a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp')
-rw-r--r-- | tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp index 3d1b96a896..b99e5f75f5 100644 --- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp +++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp @@ -161,23 +161,19 @@ void tst_QAtomicInt::warningFreeHelper() constexprFunctionsHelperTemplate<QBasicAtomicInteger<long int> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<unsigned long int> >(); -#ifdef Q_ATOMIC_INT16_IS_SUPPORTED warningFreeHelperTemplate<qint16, QBasicAtomicInteger<qint16> >(); warningFreeHelperTemplate<quint16, QBasicAtomicInteger<quint16> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<qint16> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<quint16> >(); warningFreeHelperTemplate<qint16, QBasicAtomicInteger<char16_t> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<char16_t> >(); -#endif -#ifdef Q_ATOMIC_INT8_IS_SUPPORTED warningFreeHelperTemplate<char, QBasicAtomicInteger<char> >(); warningFreeHelperTemplate<signed char, QBasicAtomicInteger<signed char> >(); warningFreeHelperTemplate<unsigned char, QBasicAtomicInteger<unsigned char> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<char> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<signed char> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<unsigned char> >(); -#endif #ifdef Q_ATOMIC_INT64_IS_SUPPORTED #if !defined(__i386__) || (defined(Q_CC_GNU) && defined(__OPTIMIZE__)) @@ -205,17 +201,9 @@ void tst_QAtomicInt::alignment() static_assert(alignof(QBasicAtomicInt) == alignof(TypeInStruct<int>)); static_assert(alignof(QBasicAtomicInt) == alignof(TypeInStruct<int>)); -#ifdef Q_ATOMIC_INT32_IS_SUPPORTED QCOMPARE(alignof(QBasicAtomicInteger<int>), alignof(TypeInStruct<int>)); -#endif - -#ifdef Q_ATOMIC_INT16_IS_SUPPORTED QCOMPARE(alignof(QBasicAtomicInteger<short>), alignof(TypeInStruct<short>)); -#endif - -#ifdef Q_ATOMIC_INT8_IS_SUPPORTED QCOMPARE(alignof(QBasicAtomicInteger<char>), alignof(TypeInStruct<char>)); -#endif #if !defined(Q_PROCESSOR_X86_32) && defined(Q_ATOMIC_INT64_IS_SUPPORTED) // The alignment is different on x86_32 @@ -493,7 +481,6 @@ void tst_QAtomicInt::testAndSet() QTEST(atomic.testAndSetOrdered(expected, newval), "result"); } -#ifdef Q_ATOMIC_INT32_IS_SUPPORTED QFETCH(bool, result); // the new implementation has the version that loads the current value @@ -528,7 +515,6 @@ void tst_QAtomicInt::testAndSet() if (!result) QCOMPARE(currentval, value); } -#endif } void tst_QAtomicInt::isFetchAndStoreNative() |