diff options
Diffstat (limited to 'tests/auto/render/qscene2d')
-rw-r--r-- | tests/auto/render/qscene2d/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tests/auto/render/qscene2d/qscene2d.pro | 12 | ||||
-rw-r--r-- | tests/auto/render/qscene2d/tst_qscene2d.cpp | 45 |
3 files changed, 20 insertions, 48 deletions
diff --git a/tests/auto/render/qscene2d/CMakeLists.txt b/tests/auto/render/qscene2d/CMakeLists.txt index ff585b314..d84583007 100644 --- a/tests/auto/render/qscene2d/CMakeLists.txt +++ b/tests/auto/render/qscene2d/CMakeLists.txt @@ -1,13 +1,22 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from qscene2d.pro. ##################################################################### ## qscene2d Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(qscene2d LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(qscene2d SOURCES tst_qscene2d.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::3DCore Qt::3DCorePrivate Qt::3DQuickScene2D diff --git a/tests/auto/render/qscene2d/qscene2d.pro b/tests/auto/render/qscene2d/qscene2d.pro deleted file mode 100644 index b1d4d45a9..000000000 --- a/tests/auto/render/qscene2d/qscene2d.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app - -TARGET = qscene2d - -QT += 3dcore 3dcore-private 3drender 3drender-private testlib 3dquickscene2d 3dquickscene2d-private - -CONFIG += testcase - -SOURCES += tst_qscene2d.cpp - -include(../../core/common/common.pri) -include(../commons/commons.pri) diff --git a/tests/auto/render/qscene2d/tst_qscene2d.cpp b/tests/auto/render/qscene2d/tst_qscene2d.cpp index 3a9c0bc71..6a48d596f 100644 --- a/tests/auto/render/qscene2d/tst_qscene2d.cpp +++ b/tests/auto/render/qscene2d/tst_qscene2d.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 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) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/QTest> #include <Qt3DQuickScene2D/qscene2d.h> @@ -76,7 +51,7 @@ private Q_SLOTS: // THEN QVERIFY(spy.isValid()); QCOMPARE(scene2d.output(), newValue); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); // WHEN spy.clear(); @@ -84,7 +59,7 @@ private Q_SLOTS: // THEN QCOMPARE(scene2d.output(), newValue); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); } { // WHEN @@ -95,7 +70,7 @@ private Q_SLOTS: // THEN QVERIFY(spy.isValid()); QCOMPARE(scene2d.renderPolicy(), newValue); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); // WHEN spy.clear(); @@ -103,7 +78,7 @@ private Q_SLOTS: // THEN QCOMPARE(scene2d.renderPolicy(), newValue); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); } { // WHEN @@ -114,7 +89,7 @@ private Q_SLOTS: // THEN QVERIFY(spy.isValid()); QCOMPARE(scene2d.item(), newValue); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); // WHEN spy.clear(); @@ -122,7 +97,7 @@ private Q_SLOTS: // THEN QCOMPARE(scene2d.item(), newValue); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); } { @@ -134,7 +109,7 @@ private Q_SLOTS: // THEN QVERIFY(spy.isValid()); QCOMPARE(scene2d.isMouseEnabled(), newValue); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.size(), 1); // WHEN spy.clear(); @@ -142,7 +117,7 @@ private Q_SLOTS: // THEN QCOMPARE(scene2d.isMouseEnabled(), newValue); - QCOMPARE(spy.count(), 0); + QCOMPARE(spy.size(), 0); } } |