Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtquicktest.qdoc
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \namespace QQuickTest
6 \inheaderfile QtQuickTest
7 \inmodule QtQuickTest
8
9 \brief The QQuickTest namespace contains all the functions and
10 macros related to Qt Quick Test.
11
12 See the \l{Introduction to Qt Quick Test} for information about how to write
13 Qt Quick unit tests.
14
15 To link to the Qt Quick Test C++ library, see \l {Qt Quick Test C++ API}.
16
17 \sa {Executing C++ Before QML Tests}
18*/
19
20/*!
21 \macro QUICK_TEST_MAIN(name)
22 \relates QQuickTest
23
24 \brief Sets up the entry point for a Qt Quick Test application.
25 The \a name argument uniquely identifies this set of tests.
26
27 \snippet src_qmltest_qquicktest_snippet.cpp 1
28
29 \note The macro assumes that your test sources are in the current
30 directory, unless the \c QUICK_TEST_SOURCE_DIR environment variable is set.
31
32 \sa QUICK_TEST_MAIN_WITH_SETUP(), {Running Qt Quick Tests}
33
34*/
35
36/*!
37 \macro QUICK_TEST_MAIN_WITH_SETUP(name, QuickTestSetupClass)
38 \relates QQuickTest
39
40 \brief Sets up the entry point for a Qt Quick Test application.
41 The \a name argument uniquely identifies this set of tests.
42
43 This macro is identical to QUICK_TEST_MAIN(), except that it takes an
44 additional argument \a QuickTestSetupClass, the type of a QObject-derived
45 class which will be instantiated. With this class it is possible to define
46 additional setup code to execute before running the QML test.
47
48 \note The macro assumes that your test sources are in the current
49 directory, unless the \c QUICK_TEST_SOURCE_DIR environment variable is set.
50
51 The following snippet demonstrates the use of this macro:
52
53 \snippet src_qmltest_qquicktest.cpp 2
54
55 \sa QUICK_TEST_MAIN(), {Running Qt Quick Tests}
56*/