summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-12-08 10:30:48 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-12-08 10:44:24 +1000
commitabc174908ae3451f731064eed7c48b15560e298c (patch)
tree02cc575599accaacbaee51175da8d61211b594df /tests
parent03f5c4bdc780ba621a2db09560db3bc50eec1444 (diff)
Run tests that are not bound as resources
Diffstat (limited to 'tests')
-rw-r--r--tests/README2
-rw-r--r--tests/buttonclick/buttonclick.pro6
-rw-r--r--tests/buttonclick/buttonclick.qrc6
-rw-r--r--tests/qdeclarativebinding/qdeclarativebinding.pro6
-rw-r--r--tests/qdeclarativebinding/qdeclarativebinding.qrc6
-rw-r--r--tests/qdeclarativebinding/tst_qdeclarativebinding.cpp44
-rw-r--r--tests/qdeclarativeborderimage/qdeclarativeborderimage.pro6
-rw-r--r--tests/qdeclarativeborderimage/qdeclarativeborderimage.qrc9
-rw-r--r--tests/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp44
-rw-r--r--tests/qmlauto/buttonclick/Button.qml (renamed from tests/buttonclick/data/Button.qml)0
-rw-r--r--tests/qmlauto/buttonclick/tst_buttonclick.qml (renamed from tests/buttonclick/data/tst_buttonclick.qml)0
-rw-r--r--tests/qmlauto/qdecarativebinding/tst_binding.qml (renamed from tests/qdeclarativebinding/data/tst_binding.qml)0
-rw-r--r--tests/qmlauto/qdecarativebinding/tst_binding2.qml (renamed from tests/qdeclarativebinding/data/tst_binding2.qml)0
-rw-r--r--tests/qmlauto/qdecarativeborderimage/InvalidSciFile.qml (renamed from tests/qdeclarativeborderimage/data/InvalidSciFile.qml)0
-rw-r--r--tests/qmlauto/qdecarativeborderimage/colors-round.sci (renamed from tests/qdeclarativeborderimage/data/colors-round.sci)0
-rw-r--r--tests/qmlauto/qdecarativeborderimage/colors.png (renamed from tests/qdeclarativeborderimage/data/colors.png)bin1655 -> 1655 bytes
-rw-r--r--tests/qmlauto/qdecarativeborderimage/invalid.sci (renamed from tests/qdeclarativeborderimage/data/invalid.sci)0
-rw-r--r--tests/qmlauto/qdecarativeborderimage/tst_borderimage.qml (renamed from tests/qdeclarativeborderimage/data/tst_borderimage.qml)14
-rw-r--r--tests/qmlauto/qmlauto.pro6
-rw-r--r--tests/qmlauto/tst_qmlauto.cpp (renamed from tests/buttonclick/tst_buttonclick.cpp)2
-rw-r--r--tests/tests.pro5
21 files changed, 15 insertions, 141 deletions
diff --git a/tests/README b/tests/README
deleted file mode 100644
index 4f56a04..0000000
--- a/tests/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This directory contains some QtDeclarative tests that have been ported
-from the "tested with C++" style in Qt 4.7 to the qtest-qml style.
diff --git a/tests/buttonclick/buttonclick.pro b/tests/buttonclick/buttonclick.pro
deleted file mode 100644
index 9e41a01..0000000
--- a/tests/buttonclick/buttonclick.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE=app
-TARGET=tst_buttonclick
-CONFIG += warn_on testcase
-SOURCES += tst_buttonclick.cpp
-RESOURCES += buttonclick.qrc
-include(../../src/quicktestlib/quicktestlib_dep.pri)
diff --git a/tests/buttonclick/buttonclick.qrc b/tests/buttonclick/buttonclick.qrc
deleted file mode 100644
index 8557e70..0000000
--- a/tests/buttonclick/buttonclick.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>data/tst_buttonclick.qml</file>
- <file>data/Button.qml</file>
-</qresource>
-</RCC>
diff --git a/tests/qdeclarativebinding/qdeclarativebinding.pro b/tests/qdeclarativebinding/qdeclarativebinding.pro
deleted file mode 100644
index 708794c..0000000
--- a/tests/qdeclarativebinding/qdeclarativebinding.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE=app
-TARGET=tst_qdeclarativebinding
-CONFIG += warn_on testcase
-SOURCES += tst_qdeclarativebinding.cpp
-RESOURCES += qdeclarativebinding.qrc
-include(../../src/quicktestlib/quicktestlib_dep.pri)
diff --git a/tests/qdeclarativebinding/qdeclarativebinding.qrc b/tests/qdeclarativebinding/qdeclarativebinding.qrc
deleted file mode 100644
index dfda961..0000000
--- a/tests/qdeclarativebinding/qdeclarativebinding.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>data/tst_binding.qml</file>
- <file>data/tst_binding2.qml</file>
-</qresource>
-</RCC>
diff --git a/tests/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/qdeclarativebinding/tst_qdeclarativebinding.cpp
deleted file mode 100644
index adab1f4..0000000
--- a/tests/qdeclarativebinding/tst_qdeclarativebinding.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $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 "qdeclarativetest.h"
-
-QTEST_QUICK_MAIN(qdeclarativebinding)
diff --git a/tests/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/qdeclarativeborderimage/qdeclarativeborderimage.pro
deleted file mode 100644
index 503e565..0000000
--- a/tests/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE=app
-TARGET=tst_qdeclarativeborderimage
-CONFIG += warn_on testcase
-SOURCES += tst_qdeclarativeborderimage.cpp
-RESOURCES += qdeclarativeborderimage.qrc
-include(../../src/quicktestlib/quicktestlib_dep.pri)
diff --git a/tests/qdeclarativeborderimage/qdeclarativeborderimage.qrc b/tests/qdeclarativeborderimage/qdeclarativeborderimage.qrc
deleted file mode 100644
index d3c103d..0000000
--- a/tests/qdeclarativeborderimage/qdeclarativeborderimage.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>data/tst_borderimage.qml</file>
- <file>data/InvalidSciFile.qml</file>
- <file>data/colors.png</file>
- <file>data/colors-round.sci</file>
- <file>data/invalid.sci</file>
-</qresource>
-</RCC>
diff --git a/tests/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
deleted file mode 100644
index 70f4663..0000000
--- a/tests/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $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 "qdeclarativetest.h"
-
-QTEST_QUICK_MAIN(qdeclarativeborderimage)
diff --git a/tests/buttonclick/data/Button.qml b/tests/qmlauto/buttonclick/Button.qml
index a2716e0..a2716e0 100644
--- a/tests/buttonclick/data/Button.qml
+++ b/tests/qmlauto/buttonclick/Button.qml
diff --git a/tests/buttonclick/data/tst_buttonclick.qml b/tests/qmlauto/buttonclick/tst_buttonclick.qml
index 89e223b..89e223b 100644
--- a/tests/buttonclick/data/tst_buttonclick.qml
+++ b/tests/qmlauto/buttonclick/tst_buttonclick.qml
diff --git a/tests/qdeclarativebinding/data/tst_binding.qml b/tests/qmlauto/qdecarativebinding/tst_binding.qml
index 3b1cf8a..3b1cf8a 100644
--- a/tests/qdeclarativebinding/data/tst_binding.qml
+++ b/tests/qmlauto/qdecarativebinding/tst_binding.qml
diff --git a/tests/qdeclarativebinding/data/tst_binding2.qml b/tests/qmlauto/qdecarativebinding/tst_binding2.qml
index 414800f..414800f 100644
--- a/tests/qdeclarativebinding/data/tst_binding2.qml
+++ b/tests/qmlauto/qdecarativebinding/tst_binding2.qml
diff --git a/tests/qdeclarativeborderimage/data/InvalidSciFile.qml b/tests/qmlauto/qdecarativeborderimage/InvalidSciFile.qml
index 8a56582..8a56582 100644
--- a/tests/qdeclarativeborderimage/data/InvalidSciFile.qml
+++ b/tests/qmlauto/qdecarativeborderimage/InvalidSciFile.qml
diff --git a/tests/qdeclarativeborderimage/data/colors-round.sci b/tests/qmlauto/qdecarativeborderimage/colors-round.sci
index 5d2f49f..5d2f49f 100644
--- a/tests/qdeclarativeborderimage/data/colors-round.sci
+++ b/tests/qmlauto/qdecarativeborderimage/colors-round.sci
diff --git a/tests/qdeclarativeborderimage/data/colors.png b/tests/qmlauto/qdecarativeborderimage/colors.png
index dfb62f3..dfb62f3 100644
--- a/tests/qdeclarativeborderimage/data/colors.png
+++ b/tests/qmlauto/qdecarativeborderimage/colors.png
Binary files differ
diff --git a/tests/qdeclarativeborderimage/data/invalid.sci b/tests/qmlauto/qdecarativeborderimage/invalid.sci
index 98c72c9..98c72c9 100644
--- a/tests/qdeclarativeborderimage/data/invalid.sci
+++ b/tests/qmlauto/qdecarativeborderimage/invalid.sci
diff --git a/tests/qdeclarativeborderimage/data/tst_borderimage.qml b/tests/qmlauto/qdecarativeborderimage/tst_borderimage.qml
index 1048c05..341f902 100644
--- a/tests/qdeclarativeborderimage/data/tst_borderimage.qml
+++ b/tests/qmlauto/qdecarativeborderimage/tst_borderimage.qml
@@ -113,7 +113,7 @@ Item {
tag: "local not found",
source: "no-such-file.png",
remote: false,
- error: "qrc:data/inline:1:21: QML BorderImage: Cannot open: qrc:data/no-such-file.png"
+ error: "SUBinline:1:21: QML BorderImage: Cannot open: SUBno-such-file.png"
}
// TODO: remote tests that need to use http
]
@@ -121,8 +121,10 @@ Item {
function test_imageSource(row) {
var expectError = (row.error.length != 0)
- if (expectError)
- ignoreWarning(row.error)
+ if (expectError) {
+ var parentUrl = Qt.resolvedUrl(".")
+ ignoreWarning(row.error.replace(/SUB/g, parentUrl))
+ }
var img = Qt.createQmlObject
('import QtQuick 1.0; BorderImage { source: "' +
@@ -145,7 +147,7 @@ Item {
}
function test_clearSource() {
- compare(clearSource.source, "qrc:data/colors.png")
+ compare(clearSource.source, Qt.resolvedUrl("colors.png"))
compare(clearSource.width, 120)
compare(clearSource.height, 120)
@@ -187,14 +189,12 @@ Item {
{
tag: "local",
source: "colors-round.sci",
- sourceUrl: "qrc:data/colors-round.sci",
remote: false,
valid: true
},
{
tag: "local not found",
source: "no-such-file.sci",
- sourceUrl: "qrc:data/no-such-file.sci",
remote: false,
valid: false
}
@@ -210,7 +210,7 @@ Item {
if (row.remote)
tryCompare(img, "status", BorderImage.Loading)
- compare(img.source, row.sourceUrl)
+ compare(img.source, Qt.resolvedUrl(row.source))
compare(img.width, 300)
compare(img.height, 300)
diff --git a/tests/qmlauto/qmlauto.pro b/tests/qmlauto/qmlauto.pro
new file mode 100644
index 0000000..fa0c2dc
--- /dev/null
+++ b/tests/qmlauto/qmlauto.pro
@@ -0,0 +1,6 @@
+TEMPLATE=app
+TARGET=tst_qmlauto
+CONFIG += warn_on testcase
+SOURCES += tst_qmlauto.cpp
+DEFINES += QTEST_QUICK_SOURCE_DIR=\"\\\"$$PWD\\\"\"
+include(../../src/quicktestlib/quicktestlib_dep.pri)
diff --git a/tests/buttonclick/tst_buttonclick.cpp b/tests/qmlauto/tst_qmlauto.cpp
index d728d63..d5d85b6 100644
--- a/tests/buttonclick/tst_buttonclick.cpp
+++ b/tests/qmlauto/tst_qmlauto.cpp
@@ -41,4 +41,4 @@
#include "qdeclarativetest.h"
-QTEST_QUICK_MAIN(buttonclick)
+QTEST_QUICK_MAIN(qmlauto)
diff --git a/tests/tests.pro b/tests/tests.pro
index f13f49f..d13fd72 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,8 +1,5 @@
TEMPLATE = subdirs
-SUBDIRS += \
- qdeclarativebinding \
- qdeclarativeborderimage \
- buttonclick
+SUBDIRS += qmlauto
# This test fails, so don't run it by default
#SUBDIRS += qmlexample