summaryrefslogtreecommitdiff
path: root/tests/qml/qml.cpp
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-11-06 16:47:48 +0100
committerMilian Wolff <milian.wolff@kdab.com>2013-11-14 16:41:27 +0100
commitbc06e88886ca33ce68c3ae3a72cf011257d1fadd (patch)
tree64716a51c4da5f73425f965475e5057a1c2345bc /tests/qml/qml.cpp
parent86eacb18b6868173b63b8f67feb481d6e291ad7a (diff)
downloadqtwebchannel-bc06e88886ca33ce68c3ae3a72cf011257d1fadd.tar.gz
Add unit test harness for QWebChannel and two initial tests.
This uncovered a bug in webchannel.js, which stringified strings leading to duplicated quoting. This is also fixed now. Furthermore, some QMake changes are required to make it possible to run the tests without first installing QWebChannel. Change-Id: If7e8f73a748f86f2d5c7d39000e90612367038af Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'tests/qml/qml.cpp')
-rw-r--r--tests/qml/qml.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/qml/qml.cpp b/tests/qml/qml.cpp
new file mode 100644
index 0000000..242a2b6
--- /dev/null
+++ b/tests/qml/qml.cpp
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QWebChannel module on Qt labs.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQuickTest/quicktest.h>
+
+QUICK_TEST_MAIN(qml)