aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/doc/src/qtquicktest.qdoc
blob: d349a725f8def7b5d638ecb03a8b142c2d50f7a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
   \namespace QQuickTest
   \inheaderfile QtQuickTest
   \inmodule QtQuickTest

   \brief The QQuickTest namespace contains all the functions and
   macros related to Qt Quick Test.

   See the \l{Introduction to Qt Quick Test} for information about how to write
   Qt Quick unit tests.

   To link to the Qt Quick Test C++ library, see \l {Qt Quick Test C++ API}.

   \sa {Executing C++ Before QML Tests}
*/

/*!
    \macro QUICK_TEST_MAIN(name)
    \relates QQuickTest

    \brief Sets up the entry point for a Qt Quick Test application.
    The \a name argument uniquely identifies this set of tests.

    \snippet src_qmltest_qquicktest_snippet.cpp 1

    \note The macro assumes that your test sources are in the current
    directory, unless the \c QUICK_TEST_SOURCE_DIR environment variable is set.

    \sa QUICK_TEST_MAIN_WITH_SETUP(), {Running Qt Quick Tests}

*/

/*!
    \macro QUICK_TEST_MAIN_WITH_SETUP(name, QuickTestSetupClass)
    \relates QQuickTest

    \brief Sets up the entry point for a Qt Quick Test application.
    The \a name argument uniquely identifies this set of tests.

    This macro is identical to QUICK_TEST_MAIN(), except that it takes an
    additional argument \a QuickTestSetupClass, the type of a QObject-derived
    class which will be instantiated. With this class it is possible to define
    additional setup code to execute before running the QML test.

    \note The macro assumes that your test sources are in the current
    directory, unless the \c QUICK_TEST_SOURCE_DIR environment variable is set.

    The following snippet demonstrates the use of this macro:

    \snippet src_qmltest_qquicktest.cpp 2

    \sa QUICK_TEST_MAIN(), {Running Qt Quick Tests}
*/