diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-10-06 15:07:15 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-12-16 09:30:19 +0000 |
commit | 35a4be78eeae3799490d2b963a255b1175573fed (patch) | |
tree | 1c5f6be02490297a0df62ccaff5d6e1b5f845558 /tests/auto/quick3d | |
parent | eb11ec843bd5d28864b45c10fe783af7160b0b95 (diff) |
Add unit tests to check all Quick3D Core imports
Change-Id: I36337bce891866cbed919f80de721f5e44aa316d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests/auto/quick3d')
-rw-r--r-- | tests/auto/quick3d/3dcore/3dcore.pro | 13 | ||||
-rw-r--r-- | tests/auto/quick3d/3dcore/3dcore.qml | 43 | ||||
-rw-r--r-- | tests/auto/quick3d/3dcore/3dcore.qrc | 5 | ||||
-rw-r--r-- | tests/auto/quick3d/3dcore/tst_import3dcore.cpp | 52 | ||||
-rw-r--r-- | tests/auto/quick3d/quick3d.pro | 3 |
5 files changed, 115 insertions, 1 deletions
diff --git a/tests/auto/quick3d/3dcore/3dcore.pro b/tests/auto/quick3d/3dcore/3dcore.pro new file mode 100644 index 000000000..7ca63b415 --- /dev/null +++ b/tests/auto/quick3d/3dcore/3dcore.pro @@ -0,0 +1,13 @@ +TEMPLATE = app + +TARGET = tst_import3dcore + +QT += 3dcore 3dcore-private 3drender 3drender-private testlib 3dquick + +CONFIG += testcase + +SOURCES += tst_import3dcore.cpp + +include(../../render/qmlscenereader/qmlscenereader.pri) + +RESOURCES += 3dcore.qrc diff --git a/tests/auto/quick3d/3dcore/3dcore.qml b/tests/auto/quick3d/3dcore/3dcore.qml new file mode 100644 index 000000000..1d9d885ff --- /dev/null +++ b/tests/auto/quick3d/3dcore/3dcore.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + + +import Qt3D.Core 2.0 as QQ3Core20 +import QtQuick 2.0 + +Item { + + // Misc + //QQ3Core20.Component3D // (uncreatable) Qt3DCore::QComponent + QQ3Core20.Entity {} //Qt3DCore::QEntity, Qt3DCore::Quick::Quick3DEntity + QQ3Core20.EntityLoader {} //Qt3DCore::Quick::Quick3DEntityLoader + QQ3Core20.NodeInstantiator {} //Qt3DCore::Quick::Quick3DNodeInstantiator + QQ3Core20.Transform {} //Qt3DCore::QTransform + QQ3Core20.QuaternionAnimation {} //Qt3DCore::Quick::QQuaternionAnimation + +} diff --git a/tests/auto/quick3d/3dcore/3dcore.qrc b/tests/auto/quick3d/3dcore/3dcore.qrc new file mode 100644 index 000000000..42cce5fa7 --- /dev/null +++ b/tests/auto/quick3d/3dcore/3dcore.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>3dcore.qml</file> + </qresource> +</RCC> diff --git a/tests/auto/quick3d/3dcore/tst_import3dcore.cpp b/tests/auto/quick3d/3dcore/tst_import3dcore.cpp new file mode 100644 index 000000000..6d6f224fb --- /dev/null +++ b/tests/auto/quick3d/3dcore/tst_import3dcore.cpp @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** 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/QTest> +#include <QObject> +#include <qmlscenereader.h> + +class tst_import3dcore : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + + void checkQMLImports() + { + // GIVEN + QmlSceneReader sceneReader(QUrl("qrc:/3dcore.qml")); + + // THEN + QVERIFY(sceneReader.root() != nullptr); + } +}; + +QTEST_MAIN(tst_import3dcore) + +#include "tst_import3dcore.moc" diff --git a/tests/auto/quick3d/quick3d.pro b/tests/auto/quick3d/quick3d.pro index 4a83219d9..d5ed1ab5f 100644 --- a/tests/auto/quick3d/quick3d.pro +++ b/tests/auto/quick3d/quick3d.pro @@ -5,5 +5,6 @@ qtConfig(private_tests) { quick3dnodeinstantiator \ dynamicnodecreation \ 3drender \ - 3dinput + 3dinput \ + 3dcore } |