diff options
Diffstat (limited to 'tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp')
-rw-r--r-- | tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp index a01b097576..cb2ede7db6 100644 --- a/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp +++ b/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// 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 <QTest> @@ -9,9 +9,7 @@ #include <numeric> #include <string> -#if QT_CONFIG(cxx11_future) -# include <thread> -#endif +#include <thread> // COM interface #if defined(Q_OS_WIN) && defined(interface) @@ -91,12 +89,12 @@ void tst_QByteArrayMatcher::interface() QCOMPARE(matcher5.indexIn(haystack), 42); QCOMPARE(matcher6.indexIn(haystack), 42); - QCOMPARE(matcher1.indexIn(haystack.constData(), haystack.length()), 42); + QCOMPARE(matcher1.indexIn(haystack.constData(), haystack.size()), 42); QCOMPARE(matcher1.indexIn(haystack, 43), 84); - QCOMPARE(matcher1.indexIn(haystack.constData(), haystack.length(), 43), 84); + QCOMPARE(matcher1.indexIn(haystack.constData(), haystack.size(), 43), 84); QCOMPARE(matcher1.indexIn(haystack, 85), -1); - QCOMPARE(matcher1.indexIn(haystack.constData(), haystack.length(), 85), -1); + QCOMPARE(matcher1.indexIn(haystack.constData(), haystack.size(), 85), -1); QByteArrayMatcher matcher7(QByteArray("123")); QCOMPARE(matcher7.indexIn(haystack), 6); @@ -253,14 +251,7 @@ void tst_QByteArrayMatcher::haystacksWithMoreThan4GiBWork() QCOMPARE(large.size(), BaseSize + needle.size()); qDebug("created dataset in %lld ms", timer.elapsed()); -# if QT_CONFIG(cxx11_future) using MaybeThread = std::thread; -# else - struct MaybeThread { - std::function<void()> func; - void join() { func(); } - }; -# endif // // WHEN: trying to match an occurrence past the 4GiB mark |