diff options
Diffstat (limited to 'tests/auto/cmake/test_standalone_test')
-rw-r--r-- | tests/auto/cmake/test_standalone_test/CMakeLists.txt | 14 | ||||
-rw-r--r-- | tests/auto/cmake/test_standalone_test/tst_standalone_test.cpp | 22 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_standalone_test/CMakeLists.txt b/tests/auto/cmake/test_standalone_test/CMakeLists.txt new file mode 100644 index 0000000000..169d824c88 --- /dev/null +++ b/tests/auto/cmake/test_standalone_test/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +cmake_minimum_required(VERSION 3.16) +project(tststandalone_test LANGUAGES CXX) +find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) + +qt_internal_add_test(tst_standalone_test + GUI + SOURCES + tst_standalone_test.cpp + LIBRARIES + Qt::Gui +) diff --git a/tests/auto/cmake/test_standalone_test/tst_standalone_test.cpp b/tests/auto/cmake/test_standalone_test/tst_standalone_test.cpp new file mode 100644 index 0000000000..fa533602ec --- /dev/null +++ b/tests/auto/cmake/test_standalone_test/tst_standalone_test.cpp @@ -0,0 +1,22 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QWindow> + +class tst_standalone_test : public QObject +{ + Q_OBJECT + +private slots: + void testLaunched() + { + QWindow w; + w.show(); + QVERIFY(QTest::qWaitForWindowActive(&w)); + } +}; + +QTEST_MAIN(tst_standalone_test) + +#include "tst_standalone_test.moc" |