diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-10-09 13:20:14 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-10-10 06:05:50 +0300 |
commit | 93204b3bda941f1b36042fad46753c3f3219a082 (patch) | |
tree | 78fc726ee2765e2d85da2776edee2c4d1a69e280 /tests/auto | |
parent | edbaf4a432bca084a01d739e16386a00919154b9 (diff) |
Added initial QML autotests
Just a skeleton for now.
Change-Id: I27d577062e7e96880d843a87b71791f896bc2522
Change-Id: I27d577062e7e96880d843a87b71791f896bc2522
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/auto.pro | 4 | ||||
-rw-r--r-- | tests/auto/qmltest/bars3d/tst_basic.qml | 42 | ||||
-rw-r--r-- | tests/auto/qmltest/qmltest.pro | 8 | ||||
-rw-r--r-- | tests/auto/qmltest/scatter3d/tst_basic.qml | 42 | ||||
-rw-r--r-- | tests/auto/qmltest/surface3d/tst_basic.qml | 42 | ||||
-rw-r--r-- | tests/auto/qmltest/tst_qmltest.cpp | 38 |
6 files changed, 176 insertions, 0 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro new file mode 100644 index 00000000..237e5116 --- /dev/null +++ b/tests/auto/auto.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS = qmltest + +installed_cmake.depends = cmake diff --git a/tests/auto/qmltest/bars3d/tst_basic.qml b/tests/auto/qmltest/bars3d/tst_basic.qml new file mode 100644 index 00000000..bc4abd97 --- /dev/null +++ b/tests/auto/qmltest/bars3d/tst_basic.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +import QtQuick 2.3 +import QtDataVisualization 1.2 +import QtTest 1.0 + +Item { + id: top + height: 150 + width: 150 + + Bars3D { + id: empty + } + + TestCase { + name: "Bars3D" + when: windowShown + + function test_empty() { + compare(empty.width, 0) + compare(empty.height, 0) + // TODO: Test default values of properties + } + } +} diff --git a/tests/auto/qmltest/qmltest.pro b/tests/auto/qmltest/qmltest.pro new file mode 100644 index 00000000..b2f977eb --- /dev/null +++ b/tests/auto/qmltest/qmltest.pro @@ -0,0 +1,8 @@ +TEMPLATE = app +TARGET = tst_qmltest +CONFIG += qmltestcase +CONFIG += console +SOURCES += tst_qmltest.cpp +OTHER_FILES += bars3d\tst_basic.qml \ + scatter3d\tst_basic.qml \ + surface3d\tst_basic.qml diff --git a/tests/auto/qmltest/scatter3d/tst_basic.qml b/tests/auto/qmltest/scatter3d/tst_basic.qml new file mode 100644 index 00000000..34a6bed1 --- /dev/null +++ b/tests/auto/qmltest/scatter3d/tst_basic.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +import QtQuick 2.3 +import QtDataVisualization 1.2 +import QtTest 1.0 + +Item { + id: top + height: 150 + width: 150 + + Scatter3D { + id: empty + } + + TestCase { + name: "Scatter3D" + when: windowShown + + function test_empty() { + compare(empty.width, 0) + compare(empty.height, 0) + // TODO: Test default values of properties + } + } +} diff --git a/tests/auto/qmltest/surface3d/tst_basic.qml b/tests/auto/qmltest/surface3d/tst_basic.qml new file mode 100644 index 00000000..7d13e093 --- /dev/null +++ b/tests/auto/qmltest/surface3d/tst_basic.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +import QtQuick 2.3 +import QtDataVisualization 1.2 +import QtTest 1.0 + +Item { + id: top + height: 150 + width: 150 + + Surface3D { + id: empty + } + + TestCase { + name: "Surface3D" + when: windowShown + + function test_empty() { + compare(empty.width, 0) + compare(empty.height, 0) + // TODO: Test default values of properties + } + } +} diff --git a/tests/auto/qmltest/tst_qmltest.cpp b/tests/auto/qmltest/tst_qmltest.cpp new file mode 100644 index 00000000..44c1ddea --- /dev/null +++ b/tests/auto/qmltest/tst_qmltest.cpp @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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.LGPLv3 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.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 later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtQuickTest/quicktest.h> +QUICK_TEST_MAIN(qmltest) |