aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/material
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-06-12 12:18:44 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-06-14 14:52:32 +0000
commit73e722a85fbf0675938023b0207d7daac93b085a (patch)
treed7de8c55d967d169455576c92e93f1df76dde0a0 /tests/auto/controls/material
parent9e1efc547f3e8e16fabe0164f4d670e701cb4ead (diff)
Replace tst_styles with tst_material & tst_universal
The CI was not able to catch failures in tst_styles, because the test results were output by separate child processes. This change builds three different versions of tst_controls, which each run with the appropriate style. Change-Id: I95b2bdd90221579a3176e827802236d80d9f1a09 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/material')
-rw-r--r--tests/auto/controls/material/material.pro15
-rw-r--r--tests/auto/controls/material/tst_material.cpp46
2 files changed, 61 insertions, 0 deletions
diff --git a/tests/auto/controls/material/material.pro b/tests/auto/controls/material/material.pro
new file mode 100644
index 00000000..1a8260f3
--- /dev/null
+++ b/tests/auto/controls/material/material.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = tst_material
+CONFIG += qmltestcase
+QT += quickcontrols2
+
+DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\"
+
+SOURCES += \
+ $$PWD/tst_material.cpp
+
+OTHER_FILES += \
+ $$PWD/../data/*
+
+TESTDATA += \
+ $$PWD/../data/tst_*
diff --git a/tests/auto/controls/material/tst_material.cpp b/tests/auto/controls/material/tst_material.cpp
new file mode 100644
index 00000000..2825b127
--- /dev/null
+++ b/tests/auto/controls/material/tst_material.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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.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>
+#include <QtQuickControls2/qquickstyle.h>
+
+int main(int argc, char *argv[])
+{
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT
+ QTEST_SET_MAIN_SOURCE_PATH
+ QQuickStyle::setStyle("Material");
+ return quick_test_main(argc, argv, "tst_controls::Material", TST_CONTROLS_DATA);
+}