diff options
Diffstat (limited to 'tests/auto/quickcontrols/controls/material')
5 files changed, 92 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols/controls/material/BLACKLIST b/tests/auto/quickcontrols/controls/material/BLACKLIST new file mode 100644 index 0000000000..b643dd1d9c --- /dev/null +++ b/tests/auto/quickcontrols/controls/material/BLACKLIST @@ -0,0 +1,13 @@ +# See qtbase/src/testlib/qtestblacklist.cpp for format + +# QTBUG-70597 +[Tumbler::test_itemsCorrectlyPositioned] +* + +# QTBUG-95750 +[RangeSlider::test_overlappingHandles] +b2qt +qnx + +[ComboBox::test_keyClose] +macos arm ci # QTBUG-102817 diff --git a/tests/auto/quickcontrols/controls/material/CMakeLists.txt b/tests/auto/quickcontrols/controls/material/CMakeLists.txt new file mode 100644 index 0000000000..5b7836e769 --- /dev/null +++ b/tests/auto/quickcontrols/controls/material/CMakeLists.txt @@ -0,0 +1,48 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +# Generated from material.pro. + +if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_material LANGUAGES C CXX ASM) + find_package(Qt6BuildInternals COMPONENTS STANDALONE_TEST) +endif() + +##################################################################### +## tst_material Test: +##################################################################### + +# Collect test data +file(GLOB_RECURSE test_data_glob + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../data/*) +list(APPEND test_data ${test_data_glob}) + +qt_internal_add_test(tst_material + GUI + QMLTEST + SOURCES + tst_material.cpp + DEFINES + TST_CONTROLS_DATA=\\\"${CMAKE_CURRENT_SOURCE_DIR}/../data\\\" + LIBRARIES + Qt::Gui + Qt::QuickControls2 + TESTDATA ${test_data} +) + +# Make the QML files available to Creator's locator. +target_sources(tst_material + PRIVATE + ${test_data} +) + +set_source_files_properties(${test_data} + PROPERTIES + HEADER_FILE_ONLY ON +) + +#### Keys ignored in scope 1:.:.:material.pro:<TRUE>: +# OTHER_FILES = "$$PWD/../data/*.qml" +# TEMPLATE = "app" diff --git a/tests/auto/quickcontrols/controls/material/dependencies.qml b/tests/auto/quickcontrols/controls/material/dependencies.qml new file mode 100644 index 0000000000..8bcf03013c --- /dev/null +++ b/tests/auto/quickcontrols/controls/material/dependencies.qml @@ -0,0 +1,6 @@ +import QtTest +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.Material + +TestCase { } diff --git a/tests/auto/quickcontrols/controls/material/dummy_imports.qml b/tests/auto/quickcontrols/controls/material/dummy_imports.qml new file mode 100644 index 0000000000..66e184f138 --- /dev/null +++ b/tests/auto/quickcontrols/controls/material/dummy_imports.qml @@ -0,0 +1,12 @@ +// This file exists for the sole purpose for qmlimportscanner to find +// which modules it needs to extract for deployment. +// Otherwise, it fails to find the imports that are expressed in C++. + +import QtQml +import QtCore +import QtQuick +import QtQuick.NativeStyle +import QtQuick.Layouts +import Qt.labs.qmlmodels + +QtObject { } diff --git a/tests/auto/quickcontrols/controls/material/tst_material.cpp b/tests/auto/quickcontrols/controls/material/tst_material.cpp new file mode 100644 index 0000000000..1fa55ab4dc --- /dev/null +++ b/tests/auto/quickcontrols/controls/material/tst_material.cpp @@ -0,0 +1,13 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +#include <QtQuickTest/quicktest.h> +#include <QtQuickControls2/qquickstyle.h> + +int main(int argc, char *argv[]) +{ + QTEST_SET_MAIN_SOURCE_PATH + qputenv("QML_NO_TOUCH_COMPRESSION", "1"); + QQuickStyle::setStyle("Material"); + return quick_test_main(argc, argv, "tst_controls::Material", TST_CONTROLS_DATA); +} |