summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qunicodetools
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qunicodetools')
-rw-r--r--tests/auto/corelib/text/qunicodetools/CMakeLists.txt8
-rw-r--r--tests/auto/corelib/text/qunicodetools/tst_qunicodetools.cpp4
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/corelib/text/qunicodetools/CMakeLists.txt b/tests/auto/corelib/text/qunicodetools/CMakeLists.txt
index 1b78a89679..fe7d8e35e2 100644
--- a/tests/auto/corelib/text/qunicodetools/CMakeLists.txt
+++ b/tests/auto/corelib/text/qunicodetools/CMakeLists.txt
@@ -1,10 +1,16 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qunicodetools Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qunicodetools LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qunicodetools
SOURCES
tst_qunicodetools.cpp
diff --git a/tests/auto/corelib/text/qunicodetools/tst_qunicodetools.cpp b/tests/auto/corelib/text/qunicodetools/tst_qunicodetools.cpp
index 15aec7d63e..774c01c73b 100644
--- a/tests/auto/corelib/text/qunicodetools/tst_qunicodetools.cpp
+++ b/tests/auto/corelib/text/qunicodetools/tst_qunicodetools.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 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>
#include <qchar.h>
@@ -47,7 +47,7 @@ static void verifyCharClassPattern(QString str, qulonglong pattern,
QCharAttributes cleared;
memset(&cleared, 0, sizeof(QCharAttributes));
QList<QCharAttributes> attributes(str.size() + 1, cleared);
- QUnicodeTools::initCharAttributes(str, scriptItems.data(), scriptItems.count(),
+ QUnicodeTools::initCharAttributes(str, scriptItems.data(), scriptItems.size(),
attributes.data(), type);
qulonglong bit = 1ull << str.size();