summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp8
-rw-r--r--tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp31
2 files changed, 4 insertions, 35 deletions
diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
index d1c0c8e965..4b38d46317 100644
--- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
+++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
@@ -364,7 +364,7 @@ void tst_QRandomGenerator::bounded()
QCOMPARE(ivalue, int(expected));
// confirm only the bound now
- setRNGControl(control & (SkipHWRNG|SkipSystemRNG|SkipMemfill));
+ setRNGControl(control & (SkipHWRNG|SkipSystemRNG));
value = QRandomGenerator::bounded(sup);
QVERIFY(value < sup);
@@ -536,7 +536,6 @@ void tst_QRandomGenerator::stdUniformIntDistribution_data()
auto newRow = [](quint32 max) {
QTest::addRow("default:%u", max) << 0U << max;
- QTest::addRow("direct:%u", max) << uint(SkipMemfill) << max;
QTest::addRow("system:%u", max) << uint(SkipHWRNG) << max;
#ifdef HAVE_FALLBACK_ENGINE
QTest::addRow("fallback:%u", max) << uint(SkipHWRNG | SkipSystemRNG) << max;
@@ -555,7 +554,7 @@ void tst_QRandomGenerator::stdUniformIntDistribution()
{
QFETCH(uint, control);
QFETCH(quint32, max);
- setRNGControl(control & (SkipHWRNG|SkipSystemRNG|SkipMemfill));
+ setRNGControl(control & (SkipHWRNG|SkipSystemRNG));
{
QRandomGenerator rd;
@@ -653,7 +652,6 @@ void tst_QRandomGenerator::stdUniformRealDistribution_data()
auto newRow = [](double min, double sup) {
QTest::addRow("default:%g-%g", min, sup) << 0U << min << sup;
- QTest::addRow("direct:%g-%g", min, sup) << uint(SkipMemfill) << min << sup;
QTest::addRow("system:%g-%g", min, sup) << uint(SkipHWRNG) << min << sup;
#ifdef HAVE_FALLBACK_ENGINE
QTest::addRow("fallback:%g-%g", min, sup) << uint(SkipHWRNG | SkipSystemRNG) << min << sup;
@@ -673,7 +671,7 @@ void tst_QRandomGenerator::stdUniformRealDistribution()
QFETCH(uint, control);
QFETCH(double, min);
QFETCH(double, sup);
- setRNGControl(control & (SkipHWRNG|SkipSystemRNG|SkipMemfill));
+ setRNGControl(control & (SkipHWRNG|SkipSystemRNG));
{
QRandomGenerator rd;
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
index e482b409a5..61d1f86f00 100644
--- a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -483,32 +483,6 @@ struct has_qCompareStrings {
};
template <typename LHS, typename RHS>
-using if_has_qCompareStrings = typename std::enable_if<has_qCompareStrings<LHS, RHS>::value, bool>::type;
-
-template <typename LHS, typename RHS>
-using if_lacks_qCompareStrings = typename std::enable_if<!has_qCompareStrings<LHS, RHS>::value, bool>::type;
-
-static inline Q_DECL_CONSTEXPR int sign(int x) Q_DECL_NOTHROW
-{
- return x < 0 ? -1 :
- x > 0 ? +1 :
- /*else*/ 0 ;
-}
-
-template <typename LHS, typename RHS, if_has_qCompareStrings<LHS, RHS> = true>
-int qCompareStringsWrapper(const LHS &lhs, const RHS &rhs, Qt::CaseSensitivity cs, int)
- Q_DECL_NOEXCEPT_EXPR(noexcept(qCompareStrings(lhs, rhs, cs)))
-{
- return qCompareStrings(lhs, rhs, cs);
-}
-
-template <typename LHS, typename RHS, if_lacks_qCompareStrings<LHS, RHS> = true>
-int qCompareStringsWrapper(const LHS &, const RHS &, Qt::CaseSensitivity, int result)
-{
- return result;
-}
-
-template <typename LHS, typename RHS>
void tst_QStringApiSymmetry::compare_impl() const
{
QFETCH(QStringRef, lhsUnicode);
@@ -517,6 +491,7 @@ void tst_QStringApiSymmetry::compare_impl() const
QFETCH(QLatin1String, rhsLatin1);
QFETCH(int, caseSensitiveCompareResult);
QFETCH(const int, caseInsensitiveCompareResult);
+ Q_UNUSED(caseInsensitiveCompareResult);
const auto lhsU8 = lhsUnicode.toUtf8();
const auto rhsU8 = rhsUnicode.toUtf8();
@@ -533,10 +508,6 @@ void tst_QStringApiSymmetry::compare_impl() const
# define QVERIFY_NOEXCEPT(expr)
#endif
- QCOMPARE(sign(qCompareStringsWrapper(lhs, rhs, Qt::CaseSensitive, caseSensitiveCompareResult)),
- sign(caseSensitiveCompareResult));
- QCOMPARE(sign(qCompareStringsWrapper(lhs, rhs, Qt::CaseInsensitive, caseInsensitiveCompareResult)),
- sign(caseInsensitiveCompareResult));
#define CHECK(op) \
QVERIFY_NOEXCEPT(lhs op rhs); \
do { if (caseSensitiveCompareResult op 0) { \