diff options
Diffstat (limited to 'tests/auto/corelib/text/qbytearraymatcher')
-rw-r--r-- | tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp | 13 |
2 files changed, 8 insertions, 11 deletions
diff --git a/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt b/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt index 08534b4609..f500210f0f 100644 --- a/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt +++ b/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qbytearraymatcher Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qbytearraymatcher LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qbytearraymatcher SOURCES tst_qbytearraymatcher.cpp diff --git a/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp index 3d3b724599..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) @@ -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 |