summaryrefslogtreecommitdiffstats
path: root/tests/auto/core
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/core')
-rw-r--r--tests/auto/core/CMakeLists.txt15
-rw-r--r--tests/auto/core/aspectcommanddebugger/CMakeLists.txt11
-rw-r--r--tests/auto/core/aspectcommanddebugger/aspectcommanddebugger.pro7
-rw-r--r--tests/auto/core/aspectcommanddebugger/tst_aspectcommanddebugger.cpp29
-rw-r--r--tests/auto/core/common/common.cmake3
-rw-r--r--tests/auto/core/common/common.pri22
-rw-r--r--tests/auto/core/common/qbackendnodetester.cpp42
-rw-r--r--tests/auto/core/common/qbackendnodetester.h40
-rw-r--r--tests/auto/core/common/testarbiter.h40
-rw-r--r--tests/auto/core/core.pro36
-rw-r--r--tests/auto/core/handle/CMakeLists.txt11
-rw-r--r--tests/auto/core/handle/handle.pro7
-rw-r--r--tests/auto/core/handle/tst_handle.cpp29
-rw-r--r--tests/auto/core/matrix4x4_avx2/CMakeLists.txt15
-rw-r--r--tests/auto/core/matrix4x4_avx2/matrix4x4_avx2.pro8
-rw-r--r--tests/auto/core/matrix4x4_avx2/tst_matrix4x4_avx2.cpp530
-rw-r--r--tests/auto/core/matrix4x4_sse/CMakeLists.txt11
-rw-r--r--tests/auto/core/matrix4x4_sse/matrix4x4_sse.pro8
-rw-r--r--tests/auto/core/matrix4x4_sse/tst_matrix4x4_sse.cpp36
-rw-r--r--tests/auto/core/nodes/CMakeLists.txt11
-rw-r--r--tests/auto/core/nodes/nodes.pro9
-rw-r--r--tests/auto/core/nodes/tst_nodes.cpp107
-rw-r--r--tests/auto/core/qarmature/CMakeLists.txt11
-rw-r--r--tests/auto/core/qarmature/qarmature.pro11
-rw-r--r--tests/auto/core/qarmature/tst_qarmature.cpp29
-rw-r--r--tests/auto/core/qaspectengine/CMakeLists.txt11
-rw-r--r--tests/auto/core/qaspectengine/qaspectengine.pro7
-rw-r--r--tests/auto/core/qaspectengine/tst_qaspectengine.cpp29
-rw-r--r--tests/auto/core/qaspectfactory/CMakeLists.txt11
-rw-r--r--tests/auto/core/qaspectfactory/qaspectfactory.pro7
-rw-r--r--tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp29
-rw-r--r--tests/auto/core/qaspectjob/CMakeLists.txt11
-rw-r--r--tests/auto/core/qaspectjob/qaspectjob.pro7
-rw-r--r--tests/auto/core/qaspectjob/tst_qaspectjob.cpp35
-rw-r--r--tests/auto/core/qchangearbiter/CMakeLists.txt11
-rw-r--r--tests/auto/core/qchangearbiter/qchangearbiter.pro10
-rw-r--r--tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp29
-rw-r--r--tests/auto/core/qentity/CMakeLists.txt11
-rw-r--r--tests/auto/core/qentity/qentity.pro7
-rw-r--r--tests/auto/core/qentity/tst_qentity.cpp31
-rw-r--r--tests/auto/core/qjoint/CMakeLists.txt11
-rw-r--r--tests/auto/core/qjoint/qjoint.pro12
-rw-r--r--tests/auto/core/qjoint/tst_qjoint.cpp69
-rw-r--r--tests/auto/core/qresourcemanager/CMakeLists.txt11
-rw-r--r--tests/auto/core/qresourcemanager/qresourcemanager.pro7
-rw-r--r--tests/auto/core/qresourcemanager/tst_qresourcemanager.cpp31
-rw-r--r--tests/auto/core/qscene/CMakeLists.txt11
-rw-r--r--tests/auto/core/qscene/qscene.pro10
-rw-r--r--tests/auto/core/qscene/tst_qscene.cpp47
-rw-r--r--tests/auto/core/qscheduler/CMakeLists.txt11
-rw-r--r--tests/auto/core/qscheduler/qscheduler.pro7
-rw-r--r--tests/auto/core/qscheduler/tst_qscheduler.cpp29
-rw-r--r--tests/auto/core/qservicelocator/CMakeLists.txt11
-rw-r--r--tests/auto/core/qservicelocator/qservicelocator.pro7
-rw-r--r--tests/auto/core/qservicelocator/tst_qservicelocator.cpp29
-rw-r--r--tests/auto/core/qskeleton/CMakeLists.txt11
-rw-r--r--tests/auto/core/qskeleton/qskeleton.pro11
-rw-r--r--tests/auto/core/qskeleton/tst_qskeleton.cpp29
-rw-r--r--tests/auto/core/qskeletonloader/CMakeLists.txt11
-rw-r--r--tests/auto/core/qskeletonloader/qskeletonloader.pro12
-rw-r--r--tests/auto/core/qskeletonloader/tst_qskeletonloader.cpp37
-rw-r--r--tests/auto/core/qtransform/CMakeLists.txt11
-rw-r--r--tests/auto/core/qtransform/qtransform.pro9
-rw-r--r--tests/auto/core/qtransform/tst_qtransform.cpp49
-rw-r--r--tests/auto/core/threadpooler/CMakeLists.txt11
-rw-r--r--tests/auto/core/threadpooler/threadpooler.pro7
-rw-r--r--tests/auto/core/threadpooler/tst_threadpooler.cpp29
-rw-r--r--tests/auto/core/vector3d_base/CMakeLists.txt11
-rw-r--r--tests/auto/core/vector3d_base/tst_vector3d_base.cpp29
-rw-r--r--tests/auto/core/vector3d_base/vector3d_base.pro7
-rw-r--r--tests/auto/core/vector3d_sse/CMakeLists.txt11
-rw-r--r--tests/auto/core/vector3d_sse/tst_vector3d_sse.cpp31
-rw-r--r--tests/auto/core/vector3d_sse/vector3d_sse.pro8
-rw-r--r--tests/auto/core/vector4d_base/CMakeLists.txt11
-rw-r--r--tests/auto/core/vector4d_base/tst_vector4d_base.cpp29
-rw-r--r--tests/auto/core/vector4d_base/vector4d_base.pro7
-rw-r--r--tests/auto/core/vector4d_sse/CMakeLists.txt11
-rw-r--r--tests/auto/core/vector4d_sse/tst_vector4d_sse.cpp31
-rw-r--r--tests/auto/core/vector4d_sse/vector4d_sse.pro9
79 files changed, 393 insertions, 1656 deletions
diff --git a/tests/auto/core/CMakeLists.txt b/tests/auto/core/CMakeLists.txt
index b5e65e8ff..28d859fcd 100644
--- a/tests/auto/core/CMakeLists.txt
+++ b/tests/auto/core/CMakeLists.txt
@@ -1,7 +1,14 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from core.pro.
add_subdirectory(handle)
-add_subdirectory(qresourcemanager)
+if(NOT (UNIX AND NOT APPLE AND NOT WIN32 AND CMAKE_CROSSCOMPILING))
+ # that test is flacky on QEMU (crashes on app exit QTBUG-107693),
+ # so disabling when cross-compiling on linux
+ add_subdirectory(qresourcemanager)
+endif()
add_subdirectory(nodes)
add_subdirectory(qaspectengine)
add_subdirectory(qaspectfactory)
@@ -22,11 +29,9 @@ if(QT_FEATURE_private_tests)
add_subdirectory(aspectcommanddebugger)
add_subdirectory(qscheduler)
endif()
-if(QT_FEATURE_private_tests AND QT_FEATURE_qt3d_simd_sse2)
+if(QT_FEATURE_private_tests AND NOT (CMAKE_OSX_ARCHITECTURES MATCHES ";") AND
+ (TEST_architecture_arch STREQUAL i386 OR TEST_architecture_arch STREQUAL x86_64))
add_subdirectory(vector4d_sse)
add_subdirectory(vector3d_sse)
add_subdirectory(matrix4x4_sse)
endif()
-if(QT_FEATURE_private_tests AND QT_FEATURE_qt3d_simd_avx2)
- add_subdirectory(matrix4x4_avx2)
-endif()
diff --git a/tests/auto/core/aspectcommanddebugger/CMakeLists.txt b/tests/auto/core/aspectcommanddebugger/CMakeLists.txt
index 7497ca342..9bbcf3e68 100644
--- a/tests/auto/core/aspectcommanddebugger/CMakeLists.txt
+++ b/tests/auto/core/aspectcommanddebugger/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from aspectcommanddebugger.pro.
#####################################################################
## tst_aspectcommandddebugger Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_aspectcommandddebugger LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_aspectcommandddebugger
SOURCES
tst_aspectcommanddebugger.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/aspectcommanddebugger/aspectcommanddebugger.pro b/tests/auto/core/aspectcommanddebugger/aspectcommanddebugger.pro
deleted file mode 100644
index 029a84507..000000000
--- a/tests/auto/core/aspectcommanddebugger/aspectcommanddebugger.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_aspectcommandddebugger
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_aspectcommanddebugger.cpp
-
-QT += testlib 3dcore 3dcore-private core-private
diff --git a/tests/auto/core/aspectcommanddebugger/tst_aspectcommanddebugger.cpp b/tests/auto/core/aspectcommanddebugger/tst_aspectcommanddebugger.cpp
index f13fa2e03..71ee59192 100644
--- a/tests/auto/core/aspectcommanddebugger/tst_aspectcommanddebugger.cpp
+++ b/tests/auto/core/aspectcommanddebugger/tst_aspectcommanddebugger.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/aspectcommanddebugger_p.h>
diff --git a/tests/auto/core/common/common.cmake b/tests/auto/core/common/common.cmake
index 8b464c957..e8db8eee9 100644
--- a/tests/auto/core/common/common.cmake
+++ b/tests/auto/core/common/common.cmake
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
function(qt3d_setup_common_test target)
set(commonDir ${PROJECT_SOURCE_DIR}/tests/auto/core/common)
target_sources(${target} PRIVATE ${commonDir}/qbackendnodetester.h ${commonDir}/qbackendnodetester.cpp)
diff --git a/tests/auto/core/common/common.pri b/tests/auto/core/common/common.pri
deleted file mode 100644
index 53d2b1ac2..000000000
--- a/tests/auto/core/common/common.pri
+++ /dev/null
@@ -1,22 +0,0 @@
-INCLUDEPATH += $$PWD
-
-qtConfig(private_tests) {
- SOURCES += \
- $$PWD/qbackendnodetester.cpp
-
- HEADERS += \
- $$PWD/qbackendnodetester.h \
- $$PWD/testarbiter.h
-}
-
-QT += core-private 3dcore 3dcore-private
-
-qtConfig(qt3d-simd-avx2) {
- CONFIG += simd
- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_AVX2
-}
-
-qtConfig(qt3d-simd-sse2):!qtConfig(qt3d-simd-avx2) {
- CONFIG += simd
- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
-}
diff --git a/tests/auto/core/common/qbackendnodetester.cpp b/tests/auto/core/common/qbackendnodetester.cpp
index 0f13b481f..f3dba9a74 100644
--- a/tests/auto/core/common/qbackendnodetester.cpp
+++ b/tests/auto/core/common/qbackendnodetester.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qbackendnodetester.h"
#include <Qt3DCore/qbackendnode.h>
@@ -58,3 +22,5 @@ void QBackendNodeTester::setPeerId(QBackendNode *backend, QNodeId id)
} // namespace Qt3DCore
QT_END_NAMESPACE
+
+#include "moc_qbackendnodetester.cpp"
diff --git a/tests/auto/core/common/qbackendnodetester.h b/tests/auto/core/common/qbackendnodetester.h
index 672aa27d3..342056a68 100644
--- a/tests/auto/core/common/qbackendnodetester.h
+++ b/tests/auto/core/common/qbackendnodetester.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QT3DCORE_QBACKENDNODETESTER_H
#define QT3DCORE_QBACKENDNODETESTER_H
diff --git a/tests/auto/core/common/testarbiter.h b/tests/auto/core/common/testarbiter.h
index ec5e6966d..7f6109647 100644
--- a/tests/auto/core/common/testarbiter.h
+++ b/tests/auto/core/common/testarbiter.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <Qt3DCore/private/qchangearbiter_p.h>
#include <Qt3DCore/private/qnode_p.h>
diff --git a/tests/auto/core/core.pro b/tests/auto/core/core.pro
deleted file mode 100644
index a22402c3e..000000000
--- a/tests/auto/core/core.pro
+++ /dev/null
@@ -1,36 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS = \
- handle \
- qresourcemanager \
- nodes \
- qaspectengine \
- qaspectfactory \
- qaspectjob \
- qchangearbiter \
- qscene \
- qservicelocator \
- qjoint \
- qskeletonloader \
- qskeleton \
- qarmature
-
-qtConfig(private_tests) {
- SUBDIRS += \
- qentity \
- qtransform \
- threadpooler \
- vector4d_base \
- vector3d_base \
- aspectcommanddebugger \
- qscheduler
-
- QT_FOR_CONFIG += 3dcore-private
- qtConfig(qt3d-simd-sse2) {
- SUBDIRS += \
- vector4d_sse \
- vector3d_sse \
- matrix4x4_sse
- }
- qtConfig(qt3d-simd-avx2): SUBDIRS += matrix4x4_avx2
-}
diff --git a/tests/auto/core/handle/CMakeLists.txt b/tests/auto/core/handle/CMakeLists.txt
index ce77bd49a..899136740 100644
--- a/tests/auto/core/handle/CMakeLists.txt
+++ b/tests/auto/core/handle/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from handle.pro.
#####################################################################
## tst_handle Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_handle LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_handle
SOURCES
tst_handle.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/handle/handle.pro b/tests/auto/core/handle/handle.pro
deleted file mode 100644
index da2e504fe..000000000
--- a/tests/auto/core/handle/handle.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_handle
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_handle.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/handle/tst_handle.cpp b/tests/auto/core/handle/tst_handle.cpp
index 586ddc19b..568b377b7 100644
--- a/tests/auto/core/handle/tst_handle.cpp
+++ b/tests/auto/core/handle/tst_handle.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/qhandle_p.h>
diff --git a/tests/auto/core/matrix4x4_avx2/CMakeLists.txt b/tests/auto/core/matrix4x4_avx2/CMakeLists.txt
deleted file mode 100644
index 8fdfd32f7..000000000
--- a/tests/auto/core/matrix4x4_avx2/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-# Generated from matrix4x4_avx2.pro.
-
-#####################################################################
-## tst_matrix4x4_avx2 Test:
-#####################################################################
-
-qt_internal_add_test(tst_matrix4x4_avx2
- SOURCES
- tst_matrix4x4_avx2.cpp
- PUBLIC_LIBRARIES
- Qt::3DCore
- Qt::3DCorePrivate
- Qt::3DRenderPrivate
- Qt::Gui
-)
diff --git a/tests/auto/core/matrix4x4_avx2/matrix4x4_avx2.pro b/tests/auto/core/matrix4x4_avx2/matrix4x4_avx2.pro
deleted file mode 100644
index 4db8a1975..000000000
--- a/tests/auto/core/matrix4x4_avx2/matrix4x4_avx2.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TARGET = tst_matrix4x4_avx2
-CONFIG += testcase
-QT += testlib 3dcore 3dcore-private 3drender-private
-
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_AVX2
-
-SOURCES += tst_matrix4x4_avx2.cpp
-
diff --git a/tests/auto/core/matrix4x4_avx2/tst_matrix4x4_avx2.cpp b/tests/auto/core/matrix4x4_avx2/tst_matrix4x4_avx2.cpp
deleted file mode 100644
index 848f83432..000000000
--- a/tests/auto/core/matrix4x4_avx2/tst_matrix4x4_avx2.cpp
+++ /dev/null
@@ -1,530 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <Qt3DCore/private/matrix4x4_avx2_p.h>
-#include <Qt3DCore/private/aligned_malloc_p.h>
-
-using namespace Qt3DCore;
-
-class tst_Matrix4x4_AVX2: public QObject
-{
- Q_OBJECT
-public:
- QT3D_ALIGNED_MALLOC_AND_FREE()
-
-private Q_SLOTS:
-
- void defaultConstruction()
- {
- // GIVEN
- Matrix4x4_AVX2 mat4;
-
- // THEN
- QCOMPARE(mat4.m11(), 1.0f);
- QCOMPARE(mat4.m12(), 0.0f);
- QCOMPARE(mat4.m13(), 0.0f);
- QCOMPARE(mat4.m14(), 0.0f);
-
- QCOMPARE(mat4.m21(), 0.0f);
- QCOMPARE(mat4.m22(), 1.0f);
- QCOMPARE(mat4.m23(), 0.0f);
- QCOMPARE(mat4.m24(), 0.0f);
-
- QCOMPARE(mat4.m31(), 0.0f);
- QCOMPARE(mat4.m32(), 0.0f);
- QCOMPARE(mat4.m33(), 1.0f);
- QCOMPARE(mat4.m34(), 0.0f);
-
- QCOMPARE(mat4.m41(), 0.0f);
- QCOMPARE(mat4.m42(), 0.0f);
- QCOMPARE(mat4.m43(), 0.0f);
- QCOMPARE(mat4.m44(), 1.0f);
-
- }
-
- void checkExplicitConstruction()
- {
- // GIVEN
- Matrix4x4_AVX2 mat4(11.0f, 12.0f, 13.0f, 14.0f,
- 21.0f, 22.0f, 23.0f, 24.0f,
- 31.0f, 32.0f, 33.0f, 34.0f,
- 41.0f, 42.0f, 43.0f, 44.0f);
-
- // THEN
- QCOMPARE(mat4.m11(), 11.0f);
- QCOMPARE(mat4.m12(), 12.0f);
- QCOMPARE(mat4.m13(), 13.0f);
- QCOMPARE(mat4.m14(), 14.0f);
-
- QCOMPARE(mat4.m21(), 21.0f);
- QCOMPARE(mat4.m22(), 22.0f);
- QCOMPARE(mat4.m23(), 23.0f);
- QCOMPARE(mat4.m24(), 24.0f);
-
- QCOMPARE(mat4.m31(), 31.0f);
- QCOMPARE(mat4.m32(), 32.0f);
- QCOMPARE(mat4.m33(), 33.0f);
- QCOMPARE(mat4.m34(), 34.0f);
-
- QCOMPARE(mat4.m41(), 41.0f);
- QCOMPARE(mat4.m42(), 42.0f);
- QCOMPARE(mat4.m43(), 43.0f);
- QCOMPARE(mat4.m44(), 44.0f);
- }
-
- void checkTransposed()
- {
- // GIVEN
- Matrix4x4_AVX2 mat4(11.0f, 12.0f, 13.0f, 14.0f,
- 21.0f, 22.0f, 23.0f, 24.0f,
- 31.0f, 32.0f, 33.0f, 34.0f,
- 41.0f, 42.0f, 43.0f, 44.0f);
-
- // WHEN
- mat4 = mat4.transposed();
-
- // THEN
- QCOMPARE(mat4.m11(), 11.0f);
- QCOMPARE(mat4.m12(), 21.0f);
- QCOMPARE(mat4.m13(), 31.0f);
- QCOMPARE(mat4.m14(), 41.0f);
-
- QCOMPARE(mat4.m21(), 12.0f);
- QCOMPARE(mat4.m22(), 22.0f);
- QCOMPARE(mat4.m23(), 32.0f);
- QCOMPARE(mat4.m24(), 42.0f);
-
- QCOMPARE(mat4.m31(), 13.0f);
- QCOMPARE(mat4.m32(), 23.0f);
- QCOMPARE(mat4.m33(), 33.0f);
- QCOMPARE(mat4.m34(), 43.0f);
-
- QCOMPARE(mat4.m41(), 14.0f);
- QCOMPARE(mat4.m42(), 24.0f);
- QCOMPARE(mat4.m43(), 34.0f);
- QCOMPARE(mat4.m44(), 44.0f);
- }
-
- void checkMultiplication()
- {
- {
- // GIVEN
- QMatrix4x4 mat1;
- QMatrix4x4 mat2;
-
- mat1.rotate(45.0f, QVector3D(1.0f, 0.0f, 0.0f));
- mat2.translate(5.0f, 12.0f, 11.0f);
-
- const Matrix4x4_AVX2 mat1fast(mat1);
- const Matrix4x4_AVX2 mat2fast(mat2);
-
- // WHEN
- const Matrix4x4_AVX2 ret = mat1fast * mat2fast;
-
- // THEN
- QCOMPARE(ret.toQMatrix4x4(), mat1 * mat2);
- }
- {
- // GIVEN
- QMatrix4x4 mat1;
- QMatrix4x4 mat2;
-
- mat1.rotate(45.0f, QVector3D(1.0f, 0.0f, 0.0f));
- mat2.translate(5.0f, 12.0f, 11.0f);
-
- const Matrix4x4_AVX2 mat1fast(mat1);
- const Matrix4x4_AVX2 mat2fast(mat2);
-
- // WHEN
- const Matrix4x4_AVX2 ret = mat2fast * mat1fast;
-
- // THEN
- QCOMPARE(ret.toQMatrix4x4(), mat2 * mat1);
- }
- }
-
- void checkAddition()
- {
- {
- // GIVEN
- QMatrix4x4 mat1;
- QMatrix4x4 mat2;
-
- mat1.rotate(45.0f, QVector3D(1.0f, 0.0f, 0.0f));
- mat2.translate(5.0f, 12.0f, 11.0f);
-
- const Matrix4x4_AVX2 mat1fast(mat1);
- const Matrix4x4_AVX2 mat2fast(mat2);
-
- // WHEN
- const Matrix4x4_AVX2 ret = mat1fast + mat2fast;
-
- // THEN
- QCOMPARE(ret.toQMatrix4x4(), mat1 + mat2);
- }
- {
- // GIVEN
- QMatrix4x4 mat1;
- QMatrix4x4 mat2;
-
- mat1.rotate(45.0f, QVector3D(1.0f, 0.0f, 0.0f));
- mat2.translate(5.0f, 12.0f, 11.0f);
-
- const Matrix4x4_AVX2 mat1fast(mat1);
- const Matrix4x4_AVX2 mat2fast(mat2);
-
- // WHEN
- const Matrix4x4_AVX2 ret = mat2fast + mat1fast;
-
- // THEN
- QCOMPARE(ret.toQMatrix4x4(), mat2 + mat1);
- }
- }
-
- void checkSubstraction()
- {
- {
- // GIVEN
- QMatrix4x4 mat1;
- QMatrix4x4 mat2;
-
- mat1.rotate(45.0f, QVector3D(1.0f, 0.0f, 0.0f));
- mat2.translate(5.0f, 12.0f, 11.0f);
-
- const Matrix4x4_AVX2 mat1fast(mat1);
- const Matrix4x4_AVX2 mat2fast(mat2);
-
- // WHEN
- const Matrix4x4_AVX2 ret = mat1fast - mat2fast;
-
- // THEN
- QCOMPARE(ret.toQMatrix4x4(), mat1 - mat2);
- }
- {
- // GIVEN
- QMatrix4x4 mat1;
- QMatrix4x4 mat2;
-
- mat1.rotate(45.0f, QVector3D(1.0f, 0.0f, 0.0f));
- mat2.translate(5.0f, 12.0f, 11.0f);
-
- const Matrix4x4_AVX2 mat1fast(mat1);
- const Matrix4x4_AVX2 mat2fast(mat2);
-
- // WHEN
- const Matrix4x4_AVX2 ret = mat2fast - mat1fast;
-
- // THEN
- QCOMPARE(ret.toQMatrix4x4(), mat2 - mat1);
- }
- }
-
- void checkEquality()
- {
- {
- // GIVEN
- Matrix4x4_AVX2 c1;
- Matrix4x4_AVX2 c2;
-
- // THEN
- QVERIFY(c1 == c2);
- }
- {
- QMatrix4x4 tmp;
- tmp.translate(5.0f, 8.0f, 14.0f);
-
- // GIVEN
- Matrix4x4_AVX2 c1(tmp);
- Matrix4x4_AVX2 c2(tmp);
-
- // THEN
- QVERIFY(c1 == c2);
- }
- {
- QMatrix4x4 tmp;
- tmp.translate(5.0f, 8.0f, 14.0f);
-
- // GIVEN
- Matrix4x4_AVX2 c1;
- Matrix4x4_AVX2 c2(tmp);
-
- // THEN
- QVERIFY(!(c1 == c2));
- }
- }
-
- void checkInequality()
- {
- {
- // GIVEN
- Matrix4x4_AVX2 c1;
- Matrix4x4_AVX2 c2;
-
- // THEN
- QVERIFY(!(c1 != c2));
- }
- {
- // GIVEN
- QMatrix4x4 tmp;
- tmp.translate(5.0f, 8.0f, 14.0f);
-
- Matrix4x4_AVX2 c1(tmp);
- tmp.translate(3.0f, 9.0f, -4.0f);
- Matrix4x4_AVX2 c2(tmp);
-
- // THEN
- QVERIFY(c1 != c2);
- }
- }
-
- void checkMatrixVector4DMultiplication()
- {
-
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector4D tmpVec4(1.0f, 2.0f, 3.0f, 4.0f);
- tmpMat.translate(5.0f, 8.0f, 14.0f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector4D vec4(tmpVec4);
-
- // WHEN
- const Vector4D resultingVec = mat * vec4;
-
- // THEN
- QCOMPARE(resultingVec.toQVector4D(), tmpMat * tmpVec4);
- }
-
- void checkVector4DMatrixMultiplication()
- {
-
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector4D tmpVec4(1.0f, 2.0f, 3.0f, 4.0f);
- tmpMat.translate(5.0f, 8.0f, 14.0f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector4D vec4(tmpVec4);
-
- // WHEN
- const Vector4D resultingVec = vec4 * mat;
-
- // THEN
- QCOMPARE(resultingVec.toQVector4D(), tmpVec4 * tmpMat);
- }
-
- void checkMatrixVector3DMultiplication()
- {
-
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector3D tmpVec3(1.0f, 2.0f, 3.0f);
- tmpMat.translate(5.0f, 8.0f, 14.0f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector3D vec3(tmpVec3);
-
- // WHEN
- const Vector3D resultingVec = mat * vec3;
-
- // THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpMat * tmpVec3);
- }
-
- void checkVector3DMatrixMultiplication()
- {
-
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector3D tmpVec3(1.0f, 2.0f, 3.0f);
- tmpMat.translate(5.0f, 8.0f, 14.0f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector3D vec3(tmpVec3);
-
- // WHEN
- const Vector3D resultingVec = vec3 * mat;
-
- // THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpVec3 * tmpMat);
- }
-
- void checkRows()
- {
- // GIVEN
- const Matrix4x4_AVX2 mat4(11.0f, 12.0f, 13.0f, 14.0f,
- 21.0f, 22.0f, 23.0f, 24.0f,
- 31.0f, 32.0f, 33.0f, 34.0f,
- 41.0f, 42.0f, 43.0f, 44.0f);
-
- {
- // WHEN
- const Vector4D row = mat4.row(0);
-
- // THEN
- QCOMPARE(row.x(), 11.0f);
- QCOMPARE(row.y(), 12.0f);
- QCOMPARE(row.z(), 13.0f);
- QCOMPARE(row.w(), 14.0f);
- }
- {
- // WHEN
- const Vector4D row = mat4.row(1);
-
- // THEN
- QCOMPARE(row.x(), 21.0f);
- QCOMPARE(row.y(), 22.0f);
- QCOMPARE(row.z(), 23.0f);
- QCOMPARE(row.w(), 24.0f);
- }
- {
- // WHEN
- const Vector4D row = mat4.row(2);
-
- // THEN
- QCOMPARE(row.x(), 31.0f);
- QCOMPARE(row.y(), 32.0f);
- QCOMPARE(row.z(), 33.0f);
- QCOMPARE(row.w(), 34.0f);
- }
- {
- // WHEN
- const Vector4D row = mat4.row(3);
-
- // THEN
- QCOMPARE(row.x(), 41.0f);
- QCOMPARE(row.y(), 42.0f);
- QCOMPARE(row.z(), 43.0f);
- QCOMPARE(row.w(), 44.0f);
- }
- }
-
- void checkColumns()
- {
- // GIVEN
- const Matrix4x4_AVX2 mat4(11.0f, 12.0f, 13.0f, 14.0f,
- 21.0f, 22.0f, 23.0f, 24.0f,
- 31.0f, 32.0f, 33.0f, 34.0f,
- 41.0f, 42.0f, 43.0f, 44.0f);
-
- {
- // WHEN
- const Vector4D row = mat4.column(0);
-
- // THEN
- QCOMPARE(row.x(), 11.0f);
- QCOMPARE(row.y(), 21.0f);
- QCOMPARE(row.z(), 31.0f);
- QCOMPARE(row.w(), 41.0f);
- }
- {
- // WHEN
- const Vector4D row = mat4.column(1);
-
- // THEN
- QCOMPARE(row.x(), 12.0f);
- QCOMPARE(row.y(), 22.0f);
- QCOMPARE(row.z(), 32.0f);
- QCOMPARE(row.w(), 42.0f);
- }
- {
- // WHEN
- const Vector4D row = mat4.column(2);
-
- // THEN
- QCOMPARE(row.x(), 13.0f);
- QCOMPARE(row.y(), 23.0f);
- QCOMPARE(row.z(), 33.0f);
- QCOMPARE(row.w(), 43.0f);
- }
- {
- // WHEN
- const Vector4D row = mat4.column(3);
-
- // THEN
- QCOMPARE(row.x(), 14.0f);
- QCOMPARE(row.y(), 24.0f);
- QCOMPARE(row.z(), 34.0f);
- QCOMPARE(row.w(), 44.0f);
- }
- }
-
- void checkVectorMapVector()
- {
- {
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector3D tmpVec3(1.0f, 0.0f, 0.0f);
- tmpMat.rotate(90.f, 0.f, 1.f, 0.f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector3D vec3(tmpVec3);
-
- // WHEN
- const Vector3D resultingVec = mat.mapVector(vec3);
-
- // THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpMat.mapVector(tmpVec3));
- }
- {
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector3D tmpVec3(0.0f, 0.0f, -1.0f);
- tmpMat.rotate(90.f, 0.f, 1.f, 0.f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector3D vec3(tmpVec3);
-
- // WHEN
- const Vector3D resultingVec = mat.mapVector(vec3);
-
- // THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpMat.mapVector(tmpVec3));
- }
- {
- // GIVEN
- QMatrix4x4 tmpMat;
- QVector3D tmpVec3(3.0f, -3.0f, -1.0f);
- tmpMat.rotate(90.f, 0.33f, 0.33f, 0.33f);
-
- Matrix4x4_AVX2 mat(tmpMat);
- Vector3D vec3(tmpVec3);
-
- // WHEN
- const Vector3D resultingVec = mat.mapVector(vec3);
-
- // THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpMat.mapVector(tmpVec3));
- }
- }
-};
-
-QTEST_MAIN(tst_Matrix4x4_AVX2)
-
-#include "tst_matrix4x4_avx2.moc"
diff --git a/tests/auto/core/matrix4x4_sse/CMakeLists.txt b/tests/auto/core/matrix4x4_sse/CMakeLists.txt
index 79e78bae9..4491f80a9 100644
--- a/tests/auto/core/matrix4x4_sse/CMakeLists.txt
+++ b/tests/auto/core/matrix4x4_sse/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from matrix4x4_sse.pro.
#####################################################################
## tst_matrix4x4_sse Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_matrix4x4_sse LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_matrix4x4_sse
SOURCES
tst_matrix4x4_sse.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/matrix4x4_sse/matrix4x4_sse.pro b/tests/auto/core/matrix4x4_sse/matrix4x4_sse.pro
deleted file mode 100644
index ca89373e2..000000000
--- a/tests/auto/core/matrix4x4_sse/matrix4x4_sse.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TARGET = tst_matrix4x4_sse
-CONFIG += testcase
-QT += testlib 3dcore 3dcore-private
-
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
-
-SOURCES += tst_matrix4x4_sse.cpp
-
diff --git a/tests/auto/core/matrix4x4_sse/tst_matrix4x4_sse.cpp b/tests/auto/core/matrix4x4_sse/tst_matrix4x4_sse.cpp
index a9000a18a..710288973 100644
--- a/tests/auto/core/matrix4x4_sse/tst_matrix4x4_sse.cpp
+++ b/tests/auto/core/matrix4x4_sse/tst_matrix4x4_sse.cpp
@@ -1,33 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/matrix4x4_sse_p.h>
+#include <QVector4D>
using namespace Qt3DCore;
@@ -35,6 +11,7 @@ class tst_Matrix4x4_SSE: public QObject
{
Q_OBJECT
+#ifdef __SSE2__
private Q_SLOTS:
void defaultConstruction()
@@ -351,7 +328,7 @@ private Q_SLOTS:
const Vector3D resultingVec = mat * vec3;
// THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpMat * tmpVec3);
+ QCOMPARE(resultingVec.toQVector3D(), tmpMat.map(tmpVec3));
}
void checkVector3DMatrixMultiplication()
@@ -369,7 +346,7 @@ private Q_SLOTS:
const Vector3D resultingVec = vec3 * mat;
// THEN
- QCOMPARE(resultingVec.toQVector3D(), tmpVec3 * tmpMat);
+ QCOMPARE(resultingVec.toQVector3D(), (QVector4D(tmpVec3, 1.f) * tmpMat).toVector3DAffine());
}
void checkRows()
@@ -520,6 +497,7 @@ private Q_SLOTS:
QCOMPARE(resultingVec.toQVector3D(), tmpMat.mapVector(tmpVec3));
}
}
+#endif // __SSE2__
};
QTEST_MAIN(tst_Matrix4x4_SSE)
diff --git a/tests/auto/core/nodes/CMakeLists.txt b/tests/auto/core/nodes/CMakeLists.txt
index e72b54ca4..bdda3be50 100644
--- a/tests/auto/core/nodes/CMakeLists.txt
+++ b/tests/auto/core/nodes/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from nodes.pro.
#####################################################################
## tst_nodes Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_nodes LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_nodes
SOURCES
tst_nodes.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/nodes/nodes.pro b/tests/auto/core/nodes/nodes.pro
deleted file mode 100644
index b2c43f5e6..000000000
--- a/tests/auto/core/nodes/nodes.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGET = tst_nodes
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_nodes.cpp
-
-QT += testlib 3dcore 3dcore-private core-private
-
-include(../common/common.pri)
diff --git a/tests/auto/core/nodes/tst_nodes.cpp b/tests/auto/core/nodes/tst_nodes.cpp
index b5458e2e7..3c0439396 100644
--- a/tests/auto/core/nodes/tst_nodes.cpp
+++ b/tests/auto/core/nodes/tst_nodes.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/qnode.h>
@@ -616,7 +591,7 @@ void tst_Nodes::appendSingleChildNodeToNodeNoSceneExplicitParenting()
// THEN
QVERIFY(child->parent() == node.data());
QVERIFY(child->parentNode() == node.data());
- QCOMPARE(node->children().count(), 1);
+ QCOMPARE(node->children().size(), 1);
// Events are only sent when a scene is set on the root node
QCOMPARE(arbiter.dirtyNodes().size(), 0);
@@ -639,7 +614,7 @@ void tst_Nodes::appendSingleChildNodeToNodeNoSceneImplicitParenting()
// THEN
QVERIFY(child->parent() == node.data());
QVERIFY(child->parentNode() == node.data());
- QCOMPARE(node->children().count(), 1);
+ QCOMPARE(node->children().size(), 1);
// Events are only sent when a scene is set on the root node
QCOMPARE(arbiter.dirtyNodes().size(), 0);
@@ -671,7 +646,7 @@ void tst_Nodes::appendMultipleChildNodesToNodeNoScene()
}
// THEN
- QCOMPARE(node->children().count(), 10);
+ QCOMPARE(node->children().size(), 10);
// Events are only sent when a scene is set on the root node
QCOMPARE(arbiter.dirtyNodes().size(), 0);
@@ -705,7 +680,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneExplicitParenting()
QVERIFY(child->parent() == node.data());
QVERIFY(child->parentNode() == node.data());
QCOMPARE(arbiter.dirtyNodes().size(), 1); // Child Added
- QCOMPARE(node->children().count(), 1);
+ QCOMPARE(node->children().size(), 1);
QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != nullptr);
}
@@ -732,7 +707,7 @@ void tst_Nodes::appendSingleChildNodeToNodeSceneImplicitParenting()
QVERIFY(Qt3DCore::QNodePrivate::get(child.data())->scene() != nullptr);
QCOMPARE(arbiter.dirtyNodes().size(), 1);
- QCOMPARE(node->children().count(), 1);
+ QCOMPARE(node->children().size(), 1);
}
void tst_Nodes::appendMultipleChildNodesToNodeScene()
@@ -767,7 +742,7 @@ void tst_Nodes::appendMultipleChildNodesToNodeScene()
QVERIFY(Qt3DCore::QNodePrivate::get(child)->scene() == Qt3DCore::QNodePrivate::get(node.data())->m_scene);
}
// THEN
- QCOMPARE(node->children().count(), 10);
+ QCOMPARE(node->children().size(), 10);
// WHEN
QCoreApplication::processEvents();
@@ -864,7 +839,7 @@ void tst_Nodes::checkParentChangeFromExistingBackendParentToNewlyCreatedParent()
// Due to the way we create root, it has a backend
QVERIFY(Qt3DCore::QNodePrivate::get(root.data())->m_hasBackendNode == true);
- QCOMPARE(aspect->events.count(), 2);
+ QCOMPARE(aspect->events.size(), 2);
QCOMPARE(aspect->events[0].type, TestAspect::Creation);
QCOMPARE(aspect->events[0].nodeId, child->id());
QCOMPARE(aspect->events[1].type, TestAspect::Creation);
@@ -957,7 +932,7 @@ void tst_Nodes::checkBackendNodesCreatedFromTopDown()
child1->setNodeProperty(child2);
// THEN - we should have no events because the new nodes have no backend yet
- QCOMPARE(arbiter.dirtyNodes().count(), 0);
+ QCOMPARE(arbiter.dirtyNodes().size(), 0);
// WHEN - create the backend nodes
QCoreApplication::processEvents();
@@ -1043,7 +1018,7 @@ void tst_Nodes::removingSingleChildNodeFromNode()
arbiter.clear();
// THEN
- QVERIFY(root->children().count() == 1);
+ QVERIFY(root->children().size() == 1);
QVERIFY(child->parentNode() == root.data());
// WHEN
@@ -1051,7 +1026,7 @@ void tst_Nodes::removingSingleChildNodeFromNode()
// THEN
QVERIFY(child->parent() == nullptr);
- QVERIFY(root->children().count() == 0);
+ QVERIFY(root->children().size() == 0);
QCOMPARE(arbiter.dirtyNodes().size(), 1);
}
@@ -1073,7 +1048,7 @@ void tst_Nodes::checkAllBackendCreationDoneInSingleFrame()
// THEN
// Due to the way we create root, it has a backend
QVERIFY(Qt3DCore::QNodePrivate::get(root.data())->m_hasBackendNode == true);
- QCOMPARE(aspect->events.count(), 1);
+ QCOMPARE(aspect->events.size(), 1);
QCOMPARE(aspect->events[0].type, TestAspect::Creation);
QCOMPARE(aspect->events[0].nodeId, root->id());
@@ -1097,7 +1072,7 @@ void tst_Nodes::checkAllBackendCreationDoneInSingleFrame()
engine.processFrame();
// THEN - both children have their backend nodes actually created.
- QCOMPARE(aspect->events.count(), 2);
+ QCOMPARE(aspect->events.size(), 2);
QCOMPARE(aspect->events[0].type, TestAspect::Creation);
QCOMPARE(aspect->events[0].nodeId, child2->id());
QCOMPARE(aspect->events[1].type, TestAspect::Creation);
@@ -1127,7 +1102,7 @@ void tst_Nodes::removingMultipleChildNodesFromNode()
QCoreApplication::processEvents();
// THEN
- QCOMPARE(root->children().count(), 10);
+ QCOMPARE(root->children().size(), 10);
QCOMPARE(arbiter.dirtyNodes().size(), 1);
// WHEN
@@ -1136,7 +1111,7 @@ void tst_Nodes::removingMultipleChildNodesFromNode()
qDeleteAll(cl);
// THEN
- QVERIFY(root->children().count() == 0);
+ QVERIFY(root->children().size() == 0);
QCOMPARE(arbiter.dirtyNodes().size(), 0); // since all nodes are deleted, there's no backend to notify
}
@@ -1204,8 +1179,8 @@ void tst_Nodes::checkConstructionSetParentMix()
// THEN
QCoreApplication::processEvents();
- QCOMPARE(root->children().count(), 1);
- QCOMPARE(subTreeRoot->children().count(), 100);
+ QCOMPARE(root->children().size(), 1);
+ QCOMPARE(subTreeRoot->children().size(), 100);
QCOMPARE(arbiter.dirtyNodes().size(), 1); // 1 child added (subTree to root)
// Ensure first event is subTreeRoot
@@ -1269,7 +1244,7 @@ void tst_Nodes::checkConstructionWithParent()
// THEN we should get one child added change
QCoreApplication::processEvents();
- QCOMPARE(root->children().count(), 1);
+ QCOMPARE(root->children().size(), 1);
QCOMPARE(arbiter.dirtyNodes().size(), 1); // 1 child added change
QCOMPARE(arbiter.dirtyNodes().front(), root.data());
}
@@ -1301,8 +1276,8 @@ void tst_Nodes::checkConstructionWithNonRootParent()
// - and one property change event,
// in that order.
QCoreApplication::processEvents();
- QCOMPARE(root->children().count(), 1);
- QCOMPARE(parent->children().count(), 1);
+ QCOMPARE(root->children().size(), 1);
+ QCOMPARE(parent->children().size(), 1);
QCOMPARE(arbiter.dirtyNodes().size(), 1); // 1 child added changes
QCOMPARE(arbiter.dirtyNodes().front(), root.data());
@@ -1330,7 +1305,7 @@ void tst_Nodes::checkConstructionAsListElement()
// and one property change event, in that order.
QCoreApplication::processEvents();
- QCOMPARE(root->children().count(), 1);
+ QCOMPARE(root->children().size(), 1);
QCOMPARE(arbiter.dirtyNodes().size(), 1); // 1 property change
}
@@ -1363,8 +1338,8 @@ void tst_Nodes::checkSceneIsSetOnConstructionWithParent()
// When cmp is full created, it will also send the creation change for its child entity
}
QCoreApplication::processEvents();
- QCOMPARE(root->children().count(), 1);
- QCOMPARE(subTreeRoot->children().count(), 5);
+ QCOMPARE(root->children().size(), 1);
+ QCOMPARE(subTreeRoot->children().size(), 5);
QCOMPARE(arbiter.dirtyNodes().size(), 1); // 1 child added (subTree to root)
arbiter.clear();
@@ -1426,7 +1401,7 @@ void tst_Nodes::appendingParentlessComponentToEntityWithoutScene()
// THEN
QVERIFY(entity->parentNode() == nullptr);
- QVERIFY(entity->children().count() == 0);
+ QVERIFY(entity->children().size() == 0);
QVERIFY(entity->components().empty());
QVERIFY(comp->parentNode() == nullptr);
@@ -1434,7 +1409,7 @@ void tst_Nodes::appendingParentlessComponentToEntityWithoutScene()
entity->addComponent(comp);
// THEN
- QVERIFY(entity->components().count() == 1);
+ QVERIFY(entity->components().size() == 1);
QVERIFY(entity->components().first() == comp);
QVERIFY(comp->parentNode() == entity.data());
QCOMPARE(arbiter.dirtyNodes().size(), 1);
@@ -1465,10 +1440,10 @@ void tst_Nodes::appendingParentlessComponentToNonRootEntity()
// THEN
QVERIFY(root->parentNode() == nullptr);
- QVERIFY(root->children().count() == 1);
+ QVERIFY(root->children().size() == 1);
QVERIFY(root->components().empty());
QVERIFY(entity->parentNode() == root.data());
- QVERIFY(entity->children().count() == 0);
+ QVERIFY(entity->children().size() == 0);
QVERIFY(entity->components().empty());
QVERIFY(comp->parentNode() == nullptr);
@@ -1477,7 +1452,7 @@ void tst_Nodes::appendingParentlessComponentToNonRootEntity()
QCoreApplication::processEvents();
// THEN
- QVERIFY(entity->components().count() == 1);
+ QVERIFY(entity->components().size() == 1);
QVERIFY(entity->components().first() == comp);
QVERIFY(comp->parentNode() == entity.data());
@@ -1507,7 +1482,7 @@ void tst_Nodes::appendingParentlessComponentToEntityWithScene()
// THEN
QVERIFY(entity->parentNode() == nullptr);
- QVERIFY(entity->children().count() == 0);
+ QVERIFY(entity->children().size() == 0);
QVERIFY(entity->components().empty());
QVERIFY(comp->parentNode() == nullptr);
@@ -1516,7 +1491,7 @@ void tst_Nodes::appendingParentlessComponentToEntityWithScene()
QCoreApplication::processEvents();
// THEN
- QVERIFY(entity->components().count() == 1);
+ QVERIFY(entity->components().size() == 1);
QVERIFY(entity->components().first() == comp);
QVERIFY(comp->parentNode() == entity.data());
@@ -1538,7 +1513,7 @@ void tst_Nodes::appendingComponentToEntity()
// THEN
QVERIFY(entity->parentNode() == nullptr);
- QVERIFY(entity->children().count() == 1);
+ QVERIFY(entity->children().size() == 1);
QVERIFY(entity->components().empty());
QVERIFY(comp->parentNode() == entity.data());
@@ -1546,7 +1521,7 @@ void tst_Nodes::appendingComponentToEntity()
entity->addComponent(comp);
// THEN
- QVERIFY(entity->components().count() == 1);
+ QVERIFY(entity->components().size() == 1);
QVERIFY(entity->components().first() == comp);
QVERIFY(comp->parentNode() == entity.data());
QCOMPARE(arbiter.dirtyNodes().size(), 1);
@@ -1568,8 +1543,8 @@ void tst_Nodes::removingComponentFromEntity()
entity->addComponent(comp);
// THEN
- QVERIFY(entity->components().count() == 1);
- QCOMPARE(entity->children().count(), 1);
+ QVERIFY(entity->components().size() == 1);
+ QCOMPARE(entity->children().size(), 1);
QVERIFY(comp->parent() == entity.data());
// WHEN
@@ -1577,9 +1552,9 @@ void tst_Nodes::removingComponentFromEntity()
entity->removeComponent(comp);
// THEN
- QVERIFY(entity->components().count() == 0);
+ QVERIFY(entity->components().size() == 0);
QVERIFY(comp->parent() == entity.data());
- QVERIFY(entity->children().count() == 1);
+ QVERIFY(entity->children().size() == 1);
QCOMPARE(arbiter.dirtyNodes().size(), 1);
}
}
@@ -1648,7 +1623,7 @@ void tst_Nodes::checkPropertyChanges()
// THEN
QVERIFY(spy.isValid());
QCOMPARE(node.parentNode(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -1656,7 +1631,7 @@ void tst_Nodes::checkPropertyChanges()
// THEN
QCOMPARE(node.parentNode(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
{
// WHEN
@@ -1667,7 +1642,7 @@ void tst_Nodes::checkPropertyChanges()
// THEN
QVERIFY(spy.isValid());
QCOMPARE(node.isEnabled(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -1675,7 +1650,7 @@ void tst_Nodes::checkPropertyChanges()
// THEN
QCOMPARE(node.isEnabled(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
}
diff --git a/tests/auto/core/qarmature/CMakeLists.txt b/tests/auto/core/qarmature/CMakeLists.txt
index 685427e0f..7bd6a5676 100644
--- a/tests/auto/core/qarmature/CMakeLists.txt
+++ b/tests/auto/core/qarmature/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qarmature.pro.
#####################################################################
## tst_qarmature Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qarmature LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qarmature
SOURCES
tst_qarmature.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qarmature/qarmature.pro b/tests/auto/core/qarmature/qarmature.pro
deleted file mode 100644
index 1d4769310..000000000
--- a/tests/auto/core/qarmature/qarmature.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-TARGET = tst_qarmature
-
-QT += core-private 3dcore 3dcore-private testlib
-
-CONFIG += testcase
-
-SOURCES += tst_qarmature.cpp
-
-include(../common/common.pri)
diff --git a/tests/auto/core/qarmature/tst_qarmature.cpp b/tests/auto/core/qarmature/tst_qarmature.cpp
index a8199276c..54b916d00 100644
--- a/tests/auto/core/qarmature/tst_qarmature.cpp
+++ b/tests/auto/core/qarmature/tst_qarmature.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/qarmature.h>
diff --git a/tests/auto/core/qaspectengine/CMakeLists.txt b/tests/auto/core/qaspectengine/CMakeLists.txt
index 150f98968..251cac073 100644
--- a/tests/auto/core/qaspectengine/CMakeLists.txt
+++ b/tests/auto/core/qaspectengine/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qaspectengine.pro.
#####################################################################
## tst_qaspectengine Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qaspectengine LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qaspectengine
SOURCES
tst_qaspectengine.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::Gui
)
diff --git a/tests/auto/core/qaspectengine/qaspectengine.pro b/tests/auto/core/qaspectengine/qaspectengine.pro
deleted file mode 100644
index 14ba51b3d..000000000
--- a/tests/auto/core/qaspectengine/qaspectengine.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qaspectengine
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qaspectengine.cpp
-
-QT += testlib 3dcore
diff --git a/tests/auto/core/qaspectengine/tst_qaspectengine.cpp b/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
index 9352852d2..6ab228c7e 100644
--- a/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
+++ b/tests/auto/core/qaspectengine/tst_qaspectengine.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <QTimer>
diff --git a/tests/auto/core/qaspectfactory/CMakeLists.txt b/tests/auto/core/qaspectfactory/CMakeLists.txt
index ef961833d..91e2bad86 100644
--- a/tests/auto/core/qaspectfactory/CMakeLists.txt
+++ b/tests/auto/core/qaspectfactory/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qaspectfactory.pro.
#####################################################################
## tst_qaspectfactory Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qaspectfactory LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qaspectfactory
SOURCES
tst_qaspectfactory.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/qaspectfactory/qaspectfactory.pro b/tests/auto/core/qaspectfactory/qaspectfactory.pro
deleted file mode 100644
index b5b5dd5fe..000000000
--- a/tests/auto/core/qaspectfactory/qaspectfactory.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qaspectfactory
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qaspectfactory.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
index 97b46000e..8f2efa859 100644
--- a/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
+++ b/tests/auto/core/qaspectfactory/tst_qaspectfactory.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/qaspectfactory_p.h>
diff --git a/tests/auto/core/qaspectjob/CMakeLists.txt b/tests/auto/core/qaspectjob/CMakeLists.txt
index 1e905d423..2b27f3075 100644
--- a/tests/auto/core/qaspectjob/CMakeLists.txt
+++ b/tests/auto/core/qaspectjob/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qaspectjob.pro.
#####################################################################
## tst_qaspectjob Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qaspectjob LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qaspectjob
SOURCES
tst_qaspectjob.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::Gui
)
diff --git a/tests/auto/core/qaspectjob/qaspectjob.pro b/tests/auto/core/qaspectjob/qaspectjob.pro
deleted file mode 100644
index 0a7a94f6d..000000000
--- a/tests/auto/core/qaspectjob/qaspectjob.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qaspectjob
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qaspectjob.cpp
-
-QT += testlib 3dcore
diff --git a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp
index 43c511100..1ca13ee16 100644
--- a/tests/auto/core/qaspectjob/tst_qaspectjob.cpp
+++ b/tests/auto/core/qaspectjob/tst_qaspectjob.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/qaspectjob.h>
@@ -58,7 +33,7 @@ private Q_SLOTS:
job1->addDependency(job3);
// THEN
- QCOMPARE(job1->dependencies().size(), 2);
+ QCOMPARE(job1->dependencies().size(), 2U);
QCOMPARE(job1->dependencies().at(0).lock(), job2);
QCOMPARE(job1->dependencies().at(1).lock(), job3);
QVERIFY(job2->dependencies().empty());
@@ -79,7 +54,7 @@ private Q_SLOTS:
job1->removeDependency(job2);
// THEN
- QCOMPARE(job1->dependencies().size(), 1);
+ QCOMPARE(job1->dependencies().size(), 1U);
QCOMPARE(job1->dependencies().at(0).lock(), job3);
}
@@ -98,7 +73,7 @@ private Q_SLOTS:
job1->removeDependency(QWeakPointer<QAspectJob>());
// THEN
- QCOMPARE(job1->dependencies().size(), 1);
+ QCOMPARE(job1->dependencies().size(), 1U);
QCOMPARE(job1->dependencies().at(0).lock(), job3);
}
};
diff --git a/tests/auto/core/qchangearbiter/CMakeLists.txt b/tests/auto/core/qchangearbiter/CMakeLists.txt
index 23b0a2220..e3ae8bdce 100644
--- a/tests/auto/core/qchangearbiter/CMakeLists.txt
+++ b/tests/auto/core/qchangearbiter/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qchangearbiter.pro.
#####################################################################
## tst_qchangearbiter Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qchangearbiter LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qchangearbiter
SOURCES
tst_qchangearbiter.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qchangearbiter/qchangearbiter.pro b/tests/auto/core/qchangearbiter/qchangearbiter.pro
deleted file mode 100644
index 4628bf6cd..000000000
--- a/tests/auto/core/qchangearbiter/qchangearbiter.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TARGET = tst_qchangearbiter
-CONFIG += testcase
-TEMPLATE = app
-
-QT += testlib core core-private 3dcore 3dcore-private
-
-SOURCES += \
- tst_qchangearbiter.cpp
-
-include(../common/common.pri)
diff --git a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
index fc77b0343..8da627fe5 100644
--- a/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
+++ b/tests/auto/core/qchangearbiter/tst_qchangearbiter.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/qchangearbiter_p.h>
diff --git a/tests/auto/core/qentity/CMakeLists.txt b/tests/auto/core/qentity/CMakeLists.txt
index 46135ce72..73cc81b7a 100644
--- a/tests/auto/core/qentity/CMakeLists.txt
+++ b/tests/auto/core/qentity/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qentity.pro.
#####################################################################
## tst_qentity Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qentity LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qentity
SOURCES
tst_qentity.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qentity/qentity.pro b/tests/auto/core/qentity/qentity.pro
deleted file mode 100644
index 175c6d3c8..000000000
--- a/tests/auto/core/qentity/qentity.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qentity
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qentity.cpp
-
-QT += testlib 3dcore 3dcore-private core-private
diff --git a/tests/auto/core/qentity/tst_qentity.cpp b/tests/auto/core/qentity/tst_qentity.cpp
index 71f1fb66e..eb1b03f43 100644
--- a/tests/auto/core/qentity/tst_qentity.cpp
+++ b/tests/auto/core/qentity/tst_qentity.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/qentity.h>
@@ -611,7 +586,7 @@ void tst_Entity::checkComponentBookkeeping()
// WHEN
int sigCount = 0;
QObject *sigSender = comp.data();
- connect(comp.data(), &QComponent::removedFromEntity, [&sigCount, sigSender](QEntity *) {
+ connect(comp.data(), &QComponent::removedFromEntity, this, [&sigCount, sigSender](QEntity *) {
QComponent *c = qobject_cast<QComponent *>(sigSender);
if (sigSender && c)
sigCount++; // test the sender is still a QComponent when signal is emitted
diff --git a/tests/auto/core/qjoint/CMakeLists.txt b/tests/auto/core/qjoint/CMakeLists.txt
index 555e757e7..fdd3749d5 100644
--- a/tests/auto/core/qjoint/CMakeLists.txt
+++ b/tests/auto/core/qjoint/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qjoint.pro.
#####################################################################
## tst_qjoint Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qjoint LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qjoint
SOURCES
tst_qjoint.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qjoint/qjoint.pro b/tests/auto/core/qjoint/qjoint.pro
deleted file mode 100644
index e25d57102..000000000
--- a/tests/auto/core/qjoint/qjoint.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = app
-
-TARGET = tst_qjoint
-
-QT += 3dcore 3dcore-private testlib
-
-CONFIG += testcase
-
-SOURCES += \
- tst_qjoint.cpp
-
-include(../common/common.pri)
diff --git a/tests/auto/core/qjoint/tst_qjoint.cpp b/tests/auto/core/qjoint/tst_qjoint.cpp
index 6f72dc7af..8444b1511 100644
--- a/tests/auto/core/qjoint/tst_qjoint.cpp
+++ b/tests/auto/core/qjoint/tst_qjoint.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/qjoint.h>
@@ -70,7 +45,7 @@ private Q_SLOTS:
// THEN
QVERIFY(spy.isValid());
QCOMPARE(joint.scale(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -78,7 +53,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.scale(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
{
@@ -91,7 +66,7 @@ private Q_SLOTS:
// THEN
QVERIFY(spy.isValid());
QCOMPARE(joint.rotation(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -99,7 +74,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.rotation(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
{
@@ -112,7 +87,7 @@ private Q_SLOTS:
// THEN
QVERIFY(spy.isValid());
QCOMPARE(joint.translation(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -120,7 +95,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.translation(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
{
@@ -134,7 +109,7 @@ private Q_SLOTS:
// THEN
QVERIFY(spy.isValid());
QCOMPARE(joint.inverseBindMatrix(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -142,7 +117,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.inverseBindMatrix(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
{
@@ -159,8 +134,8 @@ private Q_SLOTS:
QVERIFY(spyEuler.isValid());
QCOMPARE(joint.rotationX(), newValue);
QCOMPARE(joint.rotation(), newValueAsQuaternion);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spyEuler.count(), 1);
+ QCOMPARE(spy.size(), 1);
+ QCOMPARE(spyEuler.size(), 1);
// WHEN
spy.clear();
@@ -170,8 +145,8 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.rotationX(), newValue);
QCOMPARE(joint.rotation(), newValueAsQuaternion);
- QCOMPARE(spy.count(), 0);
- QCOMPARE(spyEuler.count(), 0);
+ QCOMPARE(spy.size(), 0);
+ QCOMPARE(spyEuler.size(), 0);
joint.setRotationX(0.0f);
}
@@ -190,8 +165,8 @@ private Q_SLOTS:
QVERIFY(spyEuler.isValid());
QCOMPARE(joint.rotationY(), newValue);
QCOMPARE(joint.rotation(), newValueAsQuaternion);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spyEuler.count(), 1);
+ QCOMPARE(spy.size(), 1);
+ QCOMPARE(spyEuler.size(), 1);
// WHEN
spy.clear();
@@ -201,8 +176,8 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.rotationY(), newValue);
QCOMPARE(joint.rotation(), newValueAsQuaternion);
- QCOMPARE(spy.count(), 0);
- QCOMPARE(spyEuler.count(), 0);
+ QCOMPARE(spy.size(), 0);
+ QCOMPARE(spyEuler.size(), 0);
joint.setRotationY(0.0f);
}
@@ -221,8 +196,8 @@ private Q_SLOTS:
QVERIFY(spyEuler.isValid());
QCOMPARE(joint.rotationZ(), newValue);
QCOMPARE(joint.rotation(), newValueAsQuaternion);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spyEuler.count(), 1);
+ QCOMPARE(spy.size(), 1);
+ QCOMPARE(spyEuler.size(), 1);
// WHEN
spy.clear();
@@ -232,8 +207,8 @@ private Q_SLOTS:
// THEN
QCOMPARE(joint.rotationZ(), newValue);
QCOMPARE(joint.rotation(), newValueAsQuaternion);
- QCOMPARE(spy.count(), 0);
- QCOMPARE(spyEuler.count(), 0);
+ QCOMPARE(spy.size(), 0);
+ QCOMPARE(spyEuler.size(), 0);
joint.setRotationZ(0.0f);
}
diff --git a/tests/auto/core/qresourcemanager/CMakeLists.txt b/tests/auto/core/qresourcemanager/CMakeLists.txt
index 7b33269bf..51b6d271d 100644
--- a/tests/auto/core/qresourcemanager/CMakeLists.txt
+++ b/tests/auto/core/qresourcemanager/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qresourcemanager.pro.
#####################################################################
## tst_qresourcemanager Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qresourcemanager LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qresourcemanager
SOURCES
tst_qresourcemanager.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/qresourcemanager/qresourcemanager.pro b/tests/auto/core/qresourcemanager/qresourcemanager.pro
deleted file mode 100644
index 8fdf9b569..000000000
--- a/tests/auto/core/qresourcemanager/qresourcemanager.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qresourcemanager
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qresourcemanager.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/qresourcemanager/tst_qresourcemanager.cpp b/tests/auto/core/qresourcemanager/tst_qresourcemanager.cpp
index b8e0c5357..027eeaa32 100644
--- a/tests/auto/core/qresourcemanager/tst_qresourcemanager.cpp
+++ b/tests/auto/core/qresourcemanager/tst_qresourcemanager.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <QList>
@@ -285,7 +260,7 @@ void tst_QResourceManager::heavyDutyMultiThreadedAccess()
for (int i = 0; i < max; i++) {
QVERIFY(manager->lookupResource(i) != nullptr);
- QVERIFY(manager->lookupResource(i)->m_value = iterations);
+ QVERIFY(manager->lookupResource(i)->m_value == iterations);
}
qDeleteAll(threads);
diff --git a/tests/auto/core/qscene/CMakeLists.txt b/tests/auto/core/qscene/CMakeLists.txt
index bd0ade3ad..56d6debdc 100644
--- a/tests/auto/core/qscene/CMakeLists.txt
+++ b/tests/auto/core/qscene/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qscene.pro.
#####################################################################
## tst_qscene Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qscene LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qscene
SOURCES
tst_qscene.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qscene/qscene.pro b/tests/auto/core/qscene/qscene.pro
deleted file mode 100644
index 150b86f71..000000000
--- a/tests/auto/core/qscene/qscene.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TARGET = tst_qscene
-CONFIG += testcase
-TEMPLATE = app
-
-QT += testlib core-private 3dcore 3dcore-private
-
-SOURCES += \
- tst_qscene.cpp
-
-include(../common/common.pri)
diff --git a/tests/auto/core/qscene/tst_qscene.cpp b/tests/auto/core/qscene/tst_qscene.cpp
index 9c7e5ebc5..1ac4c959c 100644
--- a/tests/auto/core/qscene/tst_qscene.cpp
+++ b/tests/auto/core/qscene/tst_qscene.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/qscene_p.h>
@@ -84,7 +59,7 @@ void tst_QScene::addNodeObservable()
scene->addObservable(nodes.at(i));
// THEN
- for (Qt3DCore::QNode *n : qAsConst(nodes)) {
+ for (Qt3DCore::QNode *n : std::as_const(nodes)) {
QVERIFY(n == scene->lookupNode(n->id()));
}
}
@@ -137,7 +112,7 @@ void tst_QScene::addChildNode()
QCoreApplication::processEvents();
// THEN
- for (Qt3DCore::QNode *n : qAsConst(nodes)) {
+ for (Qt3DCore::QNode *n : std::as_const(nodes)) {
QVERIFY(scene->lookupNode(n->id()) == n);
}
}
@@ -178,16 +153,16 @@ void tst_QScene::deleteChildNode()
QCoreApplication::processEvents();
// THEN
- for (Qt3DCore::QNode *n : qAsConst(nodes1)) {
+ for (Qt3DCore::QNode *n : std::as_const(nodes1)) {
QVERIFY(scene->lookupNode(n->id()) == n);
}
- for (Qt3DCore::QNode *n : qAsConst(nodes2)) {
+ for (Qt3DCore::QNode *n : std::as_const(nodes2)) {
QVERIFY(scene->lookupNode(n->id()) == n);
}
// gather node IDs
Qt3DCore::QNodeIdVector root1ChildIds;
- for (Qt3DCore::QNode *n : qAsConst(nodes1))
+ for (Qt3DCore::QNode *n : std::as_const(nodes1))
root1ChildIds << n->id();
// WHEN
@@ -195,7 +170,7 @@ void tst_QScene::deleteChildNode()
QCoreApplication::processEvents();
// THEN
- for (Qt3DCore::QNodeId id : qAsConst(root1ChildIds)) {
+ for (Qt3DCore::QNodeId id : std::as_const(root1ChildIds)) {
QVERIFY(scene->lookupNode(id) == nullptr);
}
@@ -204,7 +179,7 @@ void tst_QScene::deleteChildNode()
QCoreApplication::processEvents();
// THEN
- for (Qt3DCore::QNode *n : qAsConst(nodes2)) {
+ for (Qt3DCore::QNode *n : std::as_const(nodes2)) {
QVERIFY(scene->lookupNode(n->id()) == nullptr);
}
}
@@ -273,7 +248,7 @@ void tst_QScene::addEntityForComponent()
// THEN
for (int i = 0; i < 10; i++) {
const QList<Qt3DCore::QNodeId> ids = scene->entitiesForComponent(components.at(i)->id());
- QCOMPARE(ids.count(), 10);
+ QCOMPARE(ids.size(), 10);
}
}
@@ -308,7 +283,7 @@ void tst_QScene::removeEntityForComponent()
Qt3DCore::QEntity *e = entities.at(i);
for (int j = 0; j < 10; j++) {
e->removeComponent(components.at(j));
- QCOMPARE(scene->entitiesForComponent(components.at(j)->id()).count(), 10 - (i + 1));
+ QCOMPARE(scene->entitiesForComponent(components.at(j)->id()).size(), 10 - (i + 1));
}
}
}
diff --git a/tests/auto/core/qscheduler/CMakeLists.txt b/tests/auto/core/qscheduler/CMakeLists.txt
index 2d6f81753..c5be7716d 100644
--- a/tests/auto/core/qscheduler/CMakeLists.txt
+++ b/tests/auto/core/qscheduler/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qscheduler.pro.
#####################################################################
## tst_qscheduler Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qscheduler LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qscheduler
SOURCES
tst_qscheduler.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/qscheduler/qscheduler.pro b/tests/auto/core/qscheduler/qscheduler.pro
deleted file mode 100644
index 078716116..000000000
--- a/tests/auto/core/qscheduler/qscheduler.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qscheduler
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qscheduler.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/qscheduler/tst_qscheduler.cpp b/tests/auto/core/qscheduler/tst_qscheduler.cpp
index a0df4b935..2489818ba 100644
--- a/tests/auto/core/qscheduler/tst_qscheduler.cpp
+++ b/tests/auto/core/qscheduler/tst_qscheduler.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QtTest>
#include <Qt3DCore/qaspectjob.h>
diff --git a/tests/auto/core/qservicelocator/CMakeLists.txt b/tests/auto/core/qservicelocator/CMakeLists.txt
index 0c903dd95..6d477cfb4 100644
--- a/tests/auto/core/qservicelocator/CMakeLists.txt
+++ b/tests/auto/core/qservicelocator/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qservicelocator.pro.
#####################################################################
## tst_qservicelocator Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qservicelocator LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qservicelocator
SOURCES
tst_qservicelocator.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/qservicelocator/qservicelocator.pro b/tests/auto/core/qservicelocator/qservicelocator.pro
deleted file mode 100644
index 9ea02b56d..000000000
--- a/tests/auto/core/qservicelocator/qservicelocator.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qservicelocator
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qservicelocator.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/qservicelocator/tst_qservicelocator.cpp b/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
index e3998d635..dca53a5ef 100644
--- a/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
+++ b/tests/auto/core/qservicelocator/tst_qservicelocator.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/qservicelocator_p.h>
diff --git a/tests/auto/core/qskeleton/CMakeLists.txt b/tests/auto/core/qskeleton/CMakeLists.txt
index b4d92d9b9..de6f924b4 100644
--- a/tests/auto/core/qskeleton/CMakeLists.txt
+++ b/tests/auto/core/qskeleton/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qskeleton.pro.
#####################################################################
## tst_qskeleton Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qskeleton LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qskeleton
SOURCES
tst_qskeleton.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qskeleton/qskeleton.pro b/tests/auto/core/qskeleton/qskeleton.pro
deleted file mode 100644
index 3bbb48a3c..000000000
--- a/tests/auto/core/qskeleton/qskeleton.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-TARGET = tst_qskeleton
-
-QT += core-private 3dcore 3dcore-private testlib
-
-CONFIG += testcase
-
-SOURCES += tst_qskeleton.cpp
-
-include(../common/common.pri)
diff --git a/tests/auto/core/qskeleton/tst_qskeleton.cpp b/tests/auto/core/qskeleton/tst_qskeleton.cpp
index 151b2d1bf..d5ce41b11 100644
--- a/tests/auto/core/qskeleton/tst_qskeleton.cpp
+++ b/tests/auto/core/qskeleton/tst_qskeleton.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/qskeleton.h>
diff --git a/tests/auto/core/qskeletonloader/CMakeLists.txt b/tests/auto/core/qskeletonloader/CMakeLists.txt
index d94ec660c..11fa75053 100644
--- a/tests/auto/core/qskeletonloader/CMakeLists.txt
+++ b/tests/auto/core/qskeletonloader/CMakeLists.txt
@@ -1,15 +1,24 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qskeletonloader.pro.
#####################################################################
## tst_qskeletonloader Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qskeletonloader LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qskeletonloader
SOURCES
tst_qskeletonloader.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qskeletonloader/qskeletonloader.pro b/tests/auto/core/qskeletonloader/qskeletonloader.pro
deleted file mode 100644
index 6172906c2..000000000
--- a/tests/auto/core/qskeletonloader/qskeletonloader.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = app
-
-TARGET = tst_qskeletonloader
-
-QT += 3dcore 3dcore-private testlib
-
-CONFIG += testcase
-
-SOURCES += \
- tst_qskeletonloader.cpp
-
-include(../common/common.pri)
diff --git a/tests/auto/core/qskeletonloader/tst_qskeletonloader.cpp b/tests/auto/core/qskeletonloader/tst_qskeletonloader.cpp
index 0b01831a9..b5f7ce17c 100644
--- a/tests/auto/core/qskeletonloader/tst_qskeletonloader.cpp
+++ b/tests/auto/core/qskeletonloader/tst_qskeletonloader.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
@@ -67,7 +42,7 @@ private Q_SLOTS:
// THEN
QVERIFY(spy.isValid());
QCOMPARE(skeleton.source(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -75,7 +50,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(skeleton.source(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
{
@@ -87,7 +62,7 @@ private Q_SLOTS:
// THEN
QVERIFY(spy.isValid());
QCOMPARE(skeleton.isCreateJointsEnabled(), newValue);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
// WHEN
spy.clear();
@@ -95,7 +70,7 @@ private Q_SLOTS:
// THEN
QCOMPARE(skeleton.isCreateJointsEnabled(), newValue);
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
}
}
diff --git a/tests/auto/core/qtransform/CMakeLists.txt b/tests/auto/core/qtransform/CMakeLists.txt
index 1cac1ed5e..daa93ac75 100644
--- a/tests/auto/core/qtransform/CMakeLists.txt
+++ b/tests/auto/core/qtransform/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtransform.pro.
# special case skip regeneration
@@ -6,12 +9,18 @@
## tst_qtransform Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qt3d_qtransform LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qt3d_qtransform
SOURCES
tst_qtransform.cpp
INCLUDE_DIRECTORIES
../common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::CorePrivate
diff --git a/tests/auto/core/qtransform/qtransform.pro b/tests/auto/core/qtransform/qtransform.pro
deleted file mode 100644
index 190eab5c5..000000000
--- a/tests/auto/core/qtransform/qtransform.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGET = tst_qtransform
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qtransform.cpp
-
-QT += testlib 3dcore
-
-include(../../core/common/common.pri)
diff --git a/tests/auto/core/qtransform/tst_qtransform.cpp b/tests/auto/core/qtransform/tst_qtransform.cpp
index 0d2d45bce..3b6fe93e0 100644
--- a/tests/auto/core/qtransform/tst_qtransform.cpp
+++ b/tests/auto/core/qtransform/tst_qtransform.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <QtTest/QSignalSpy>
@@ -138,14 +113,14 @@ private Q_SLOTS:
int scale3DChangedCount = 0;
int translationChangedCount = 0;
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationChanged, [&] { ++rotationChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationXChanged, [&] { ++rotationXChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationYChanged, [&] { ++rotationYChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationZChanged, [&] { ++rotationZChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::matrixChanged, [&] { ++matrixChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::scale3DChanged, [&] { ++scale3DChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::scaleChanged, [&] { ++scaleChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::translationChanged, [&] { ++translationChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationChanged, this, [&] { ++rotationChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationXChanged, this, [&] { ++rotationXChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationYChanged, this, [&] { ++rotationYChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationZChanged, this, [&] { ++rotationZChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::matrixChanged, this, [&] { ++matrixChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::scale3DChanged, this, [&] { ++scale3DChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::scaleChanged, this, [&] { ++scaleChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::translationChanged, this, [&] { ++translationChangedCount; });
// WHEN
transform->setRotationX(180.0f);
@@ -297,7 +272,7 @@ private Q_SLOTS:
// THEN
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
QCOMPARE(arbiter.dirtyNodes().size(), 0);
QCOMPARE(t.worldMatrix(), newValue);
@@ -306,7 +281,7 @@ private Q_SLOTS:
dT->setWorldMatrix(newValue);
// THEN
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
QCOMPARE(arbiter.dirtyNodes().size(), 0);
QCOMPARE(t.worldMatrix(), newValue);
}
diff --git a/tests/auto/core/threadpooler/CMakeLists.txt b/tests/auto/core/threadpooler/CMakeLists.txt
index 7598ce97b..faeb75ec4 100644
--- a/tests/auto/core/threadpooler/CMakeLists.txt
+++ b/tests/auto/core/threadpooler/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from threadpooler.pro.
#####################################################################
## tst_threadpooler Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_threadpooler LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_threadpooler
SOURCES
tst_threadpooler.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/threadpooler/threadpooler.pro b/tests/auto/core/threadpooler/threadpooler.pro
deleted file mode 100644
index 5a1115bbf..000000000
--- a/tests/auto/core/threadpooler/threadpooler.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_threadpooler
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_threadpooler.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/threadpooler/tst_threadpooler.cpp b/tests/auto/core/threadpooler/tst_threadpooler.cpp
index fbb9849b4..d7b6063d6 100644
--- a/tests/auto/core/threadpooler/tst_threadpooler.cpp
+++ b/tests/auto/core/threadpooler/tst_threadpooler.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <QtCore/QThread>
diff --git a/tests/auto/core/vector3d_base/CMakeLists.txt b/tests/auto/core/vector3d_base/CMakeLists.txt
index 8f74e3a6f..4dda57707 100644
--- a/tests/auto/core/vector3d_base/CMakeLists.txt
+++ b/tests/auto/core/vector3d_base/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from vector3d_base.pro.
#####################################################################
## tst_vector3d_base Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_vector3d_base LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_vector3d_base
SOURCES
tst_vector3d_base.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/vector3d_base/tst_vector3d_base.cpp b/tests/auto/core/vector3d_base/tst_vector3d_base.cpp
index 4864f9e83..5969ed804 100644
--- a/tests/auto/core/vector3d_base/tst_vector3d_base.cpp
+++ b/tests/auto/core/vector3d_base/tst_vector3d_base.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/vector3d_p.h>
diff --git a/tests/auto/core/vector3d_base/vector3d_base.pro b/tests/auto/core/vector3d_base/vector3d_base.pro
deleted file mode 100644
index fa1ee87df..000000000
--- a/tests/auto/core/vector3d_base/vector3d_base.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_vector3d_base
-CONFIG += testcase
-QT += testlib 3dcore 3dcore-private
-
-SOURCES += \
- tst_vector3d_base.cpp
-
diff --git a/tests/auto/core/vector3d_sse/CMakeLists.txt b/tests/auto/core/vector3d_sse/CMakeLists.txt
index cf4ae3955..aba74e959 100644
--- a/tests/auto/core/vector3d_sse/CMakeLists.txt
+++ b/tests/auto/core/vector3d_sse/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from vector3d_sse.pro.
#####################################################################
## tst_vector3d_sse Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_vector3d_sse LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_vector3d_sse
SOURCES
tst_vector3d_sse.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/vector3d_sse/tst_vector3d_sse.cpp b/tests/auto/core/vector3d_sse/tst_vector3d_sse.cpp
index 09a5501d9..37964730f 100644
--- a/tests/auto/core/vector3d_sse/tst_vector3d_sse.cpp
+++ b/tests/auto/core/vector3d_sse/tst_vector3d_sse.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/vector3d_sse_p.h>
@@ -34,6 +9,7 @@ using namespace Qt3DCore;
class tst_Vector3D_SSE: public QObject
{
Q_OBJECT
+#ifdef __SSE2__
private Q_SLOTS:
void defaultConstruction()
{
@@ -812,6 +788,7 @@ private Q_SLOTS:
QVERIFY(!v0.isNull());
}
}
+#endif // __SSE2__
};
QTEST_APPLESS_MAIN(tst_Vector3D_SSE)
diff --git a/tests/auto/core/vector3d_sse/vector3d_sse.pro b/tests/auto/core/vector3d_sse/vector3d_sse.pro
deleted file mode 100644
index 6afc4a863..000000000
--- a/tests/auto/core/vector3d_sse/vector3d_sse.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TARGET = tst_vector3d_sse
-CONFIG += testcase simd
-QT += testlib 3dcore 3dcore-private
-
-SOURCES += \
- tst_vector3d_sse.cpp
-
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
diff --git a/tests/auto/core/vector4d_base/CMakeLists.txt b/tests/auto/core/vector4d_base/CMakeLists.txt
index 87741ff51..57f4cb774 100644
--- a/tests/auto/core/vector4d_base/CMakeLists.txt
+++ b/tests/auto/core/vector4d_base/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from vector4d_base.pro.
#####################################################################
## tst_vector4d_base Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_vector4d_base LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_vector4d_base
SOURCES
tst_vector4d_base.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/vector4d_base/tst_vector4d_base.cpp b/tests/auto/core/vector4d_base/tst_vector4d_base.cpp
index 0a580cca7..92a5f7c6c 100644
--- a/tests/auto/core/vector4d_base/tst_vector4d_base.cpp
+++ b/tests/auto/core/vector4d_base/tst_vector4d_base.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/vector4d_p.h>
diff --git a/tests/auto/core/vector4d_base/vector4d_base.pro b/tests/auto/core/vector4d_base/vector4d_base.pro
deleted file mode 100644
index 9afaff092..000000000
--- a/tests/auto/core/vector4d_base/vector4d_base.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_vector4d_base
-CONFIG += testcase
-
-SOURCES += \
- tst_vector4d_base.cpp
-
-QT += testlib 3dcore 3dcore-private
diff --git a/tests/auto/core/vector4d_sse/CMakeLists.txt b/tests/auto/core/vector4d_sse/CMakeLists.txt
index 76a080a76..00f0dedbd 100644
--- a/tests/auto/core/vector4d_sse/CMakeLists.txt
+++ b/tests/auto/core/vector4d_sse/CMakeLists.txt
@@ -1,13 +1,22 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from vector4d_sse.pro.
#####################################################################
## tst_vector4d_sse Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_vector4d_sse LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_vector4d_sse
SOURCES
tst_vector4d_sse.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::3DCore
Qt::3DCorePrivate
Qt::Gui
diff --git a/tests/auto/core/vector4d_sse/tst_vector4d_sse.cpp b/tests/auto/core/vector4d_sse/tst_vector4d_sse.cpp
index 192ec4042..a0239b2ed 100644
--- a/tests/auto/core/vector4d_sse/tst_vector4d_sse.cpp
+++ b/tests/auto/core/vector4d_sse/tst_vector4d_sse.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QTest>
#include <Qt3DCore/private/vector4d_sse_p.h>
@@ -35,6 +10,7 @@ using namespace Qt3DCore;
class tst_Vector4D_SSE: public QObject
{
Q_OBJECT
+#ifdef __SSE2__
private Q_SLOTS:
void defaultConstruction()
{
@@ -915,6 +891,7 @@ private Q_SLOTS:
QVERIFY(!v0.isNull());
}
}
+#endif
};
QTEST_APPLESS_MAIN(tst_Vector4D_SSE)
diff --git a/tests/auto/core/vector4d_sse/vector4d_sse.pro b/tests/auto/core/vector4d_sse/vector4d_sse.pro
deleted file mode 100644
index 76c425548..000000000
--- a/tests/auto/core/vector4d_sse/vector4d_sse.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGET = tst_vector4d_sse
-CONFIG += testcase simd
-
-SOURCES += \
- tst_vector4d_sse.cpp
-
-QT += testlib 3dcore 3dcore-private
-
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2