diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-01-31 16:52:36 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-03 00:39:18 +0100 |
commit | 01dc7e2ea476e0e6dcdce2e72979bbc858f4057d (patch) | |
tree | d8796f7695bbf8ad42abf47cd84c1b5e000ef795 /doc/src/qtquick1/qmltest.qdoc | |
parent | 5e07b57b818326da47a46d384415041fa4cea0ba (diff) |
Remove QtQuick1 elements from qtdeclarative
QtQuick1 is now contained in a separate repository.
Task-number: QTBUG-23737
Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'doc/src/qtquick1/qmltest.qdoc')
-rw-r--r-- | doc/src/qtquick1/qmltest.qdoc | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/doc/src/qtquick1/qmltest.qdoc b/doc/src/qtquick1/qmltest.qdoc deleted file mode 100644 index 9ef4dec111..0000000000 --- a/doc/src/qtquick1/qmltest.qdoc +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \page qmltest.html -\inqmlmodule QtQuick 1 - \title QtQuickTest Reference Documentation - \keyword QtQuickTest Reference Documentation - - \section1 Introduction - - QtQuickTest is a unit test framework for Qt Quick (QML) applications. - Test cases are written as JavaScript functions within a TestCase - element: - - \code - import QtQuick 2.0 - import QtTest 1.0 - - TestCase { - name: "MathTests" - - function test_math() { - compare(2 + 2, 4, "2 + 2 = 4") - } - - function test_fail() { - compare(2 + 2, 5, "2 + 2 = 5") - } - } - \endcode - - Functions whose names start with \c{test_} are treated as test cases - to be executed. See the documentation for the \l TestCase and - \l SignalSpy elements for more information on writing test cases. - - \section1 Running tests - - Test cases are launched by a C++ harness that consists of - the following code: - - \code - #include <QtQuickTest/quicktest.h> - QUICK_TEST_MAIN(example) - \endcode - - Where "example" is an identifier to use to uniquely identify - this set of tests. You should add \c{CONFIG += qmltestcase}. - for example: - - \code - TEMPLATE = app - TARGET = tst_example - CONFIG += warn_on qmltestcase - SOURCES += tst_example.cpp - \endcode - - The test harness scans the specified source directory recursively - for "tst_*.qml" files. If \c{QUICK_TEST_SOURCE_DIR} is not defined, - then the current directory will be scanned when the harness is run. - Other *.qml files may appear for auxillary QML components that are - used by the test. - - The \c{-input} command-line option can be set at runtime to run - test cases from a different directory. This may be needed to run - tests on a target device where the compiled-in directory name refers - to a host. For example: - - \code - tst_example -input /mnt/SDCard/qmltests - \endcode - - See \c{tests/qmlauto} in the source tree for an example of creating a - test harness that uses the \c{QUICK_TEST_SOURCE_DIR} macro. - - If your test case needs QML imports, then you can add them as - \c{-import} options to the the test program command-line by adding - the following line to your .pro file: - - \code - IMPORTPATH += $$PWD/../imports/my_module1 $$PWD/../imports/my_module2 - \endcode - - \section1 Running tests with QtQuick 1 - - The \c{-qtquick1} option can be passed to a test binary to run - the tests using QDeclarativeView (QtQuick 1) rather than QQuickView (QtQuick 2): - - \code - tst_example -qtquick1 - \endcode - - To run tests with either QtQuick 1 or QtQuick 2, use - "import QtQuick 1.0" in your unit tests and then specify - compatibility mode to the QtQuick2 engine: - - \code - QMLSCENE_IMPORT_NAME=quick1 tst_example - \endcode -*/ |