summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstringtokenizer
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qstringtokenizer')
-rw-r--r--tests/auto/corelib/text/qstringtokenizer/CMakeLists.txt8
-rw-r--r--tests/auto/corelib/text/qstringtokenizer/tst_qstringtokenizer.cpp5
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/auto/corelib/text/qstringtokenizer/CMakeLists.txt b/tests/auto/corelib/text/qstringtokenizer/CMakeLists.txt
index 480c252d8c..35fa2a31fd 100644
--- a/tests/auto/corelib/text/qstringtokenizer/CMakeLists.txt
+++ b/tests/auto/corelib/text/qstringtokenizer/CMakeLists.txt
@@ -1,12 +1,16 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-# Generated from qstringtokenizer.pro.
-
#####################################################################
## tst_qstringtokenizer Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qstringtokenizer LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qstringtokenizer
SOURCES
tst_qstringtokenizer.cpp
diff --git a/tests/auto/corelib/text/qstringtokenizer/tst_qstringtokenizer.cpp b/tests/auto/corelib/text/qstringtokenizer/tst_qstringtokenizer.cpp
index 48d053364b..0101c74a7b 100644
--- a/tests/auto/corelib/text/qstringtokenizer/tst_qstringtokenizer.cpp
+++ b/tests/auto/corelib/text/qstringtokenizer/tst_qstringtokenizer.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
-// 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 <QStringTokenizer>
#include <QStringBuilder>
@@ -9,7 +9,7 @@
#include <string>
Q_DECLARE_METATYPE(Qt::SplitBehavior)
-
+namespace {
class tst_QStringTokenizer : public QObject
{
Q_OBJECT
@@ -45,6 +45,7 @@ QStringList toQStringList(const Container &c)
r.push_back(toQString(e));
return r;
}
+} // namespace
void tst_QStringTokenizer::constExpr() const
{