aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-04-27 14:13:27 +0200
committeraxis <qt-info@nokia.com>2011-04-27 14:41:06 +0200
commit40b6a270a1f3b4c0bfb2d35cb96c4f929a7802ad (patch)
tree4b7f6d677530d690efc884dbd03a8c6518f5313d /tests
parenta129444bb0156c936900dbd2f12bd9f427ff366c (diff)
parent10991179a60fae44b2446c408b16056db8b5d36d (diff)
Merged master into qtquick2.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/compilerwarnings/data/test_cpp.txt51
-rw-r--r--tests/auto/declarative/examples/examples.pro2
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro17
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro2
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro2
-rw-r--r--tests/auto/headersclean/headersclean.pro5
-rw-r--r--tests/auto/headersclean/tst_headersclean.cpp62
-rw-r--r--tests/auto/host.pro4
-rw-r--r--tests/global/global.cfg5
11 files changed, 150 insertions, 23 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index f2173f0c90..1edeaaa956 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -2,3 +2,4 @@ TEMPLATE=subdirs
SUBDIRS=\
declarative \
+!cross_compile: SUBDIRS += host.pro
diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt
new file mode 100644
index 0000000000..a3d65dbbea
--- /dev/null
+++ b/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 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$
+**
+****************************************************************************/
+
+#ifndef QT_NO_DECLARATIVE
+#include <QtDeclarative/QtDeclarative>
+#endif
+
+#ifndef Q_OS_MAC
+int main(int, char **)
+{
+ return 0;
+}
+#endif
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index dafc146610..fa632f031b 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -4,7 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_examples.cpp
-include(../../../../tools/qml/qml.pri)
+include(../../../../tools/qmlviewer/qml.pri)
include(../symbianlibs.pri)
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index 6ef2432b5b..cbc5e18181 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -4,12 +4,17 @@ macx:CONFIG -= app_bundle
SOURCES += tst_parserstress.cpp
-symbian: {
- importFiles.files = ..\\..\\qscriptjstestsuite\\tests
- importFiles.path = .
- DEPLOYMENT += importFiles
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
+!isEmpty(QT.script.sources) {
+ symbian: {
+ importFiles.files = $$QT.script.sources\\..\\..\\tests\\auto\\qscriptjstestsuite\\tests
+ importFiles.path = .
+ DEPLOYMENT += importFiles
+ DEFINES += TESTDATADIR=tests
+ DEFINES += SRCDIR=.
+ } else {
+ DEFINES += TESTDATADIR=\\\"$$QT.script.sources/../../tests/auto/qscriptjstestsuite/tests\\\"
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+ }
}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index c0a01df7c4..19ff25a814 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -46,11 +46,6 @@
#include <QDir>
#include <QFile>
-#ifdef Q_OS_SYMBIAN
-// In Symbian OS test data is located in applications private dir
-#define SRCDIR "."
-#endif
-
class tst_parserstress : public QObject
{
Q_OBJECT
@@ -91,25 +86,23 @@ QStringList tst_parserstress::findJSFiles(const QDir &d)
void tst_parserstress::ecmascript_data()
{
-#ifdef Q_OS_SYMBIAN
- QDir dir("tests");
-#else
- QDir dir(SRCDIR);
- dir.cdUp();
- dir.cdUp();
- dir.cd("qscriptjstestsuite");
- dir.cd("tests");
-#endif
+#ifdef TESTDATADIR
+ QDir dir(TESTDATADIR);
QStringList files = findJSFiles(dir);
QTest::addColumn<QString>("file");
foreach (const QString &file, files) {
QTest::newRow(qPrintable(file)) << file;
}
+#endif
}
void tst_parserstress::ecmascript()
{
+#ifndef TESTDATADIR
+ QSKIP("Needs QtScript sources", SkipAll);
+#else
+
QFETCH(QString, file);
QFile f(file);
@@ -157,6 +150,7 @@ void tst_parserstress::ecmascript()
QVERIFY(!component.isError());
}
+#endif // ifdef TESTDATADIR
}
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 0d335a547d..bce758a5aa 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -1,6 +1,6 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
-QT += sql script
+QT += sql script webkit
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesqldatabase.cpp
diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
index 8d4b410567..46a3daec42 100644
--- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
+++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
@@ -2,7 +2,7 @@ load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
macx:CONFIG -= app_bundle
-include(../../../../tools/qml/qml.pri)
+include(../../../../tools/qmlviewer/qml.pri)
SOURCES += tst_qdeclarativeviewer.cpp
diff --git a/tests/auto/headersclean/headersclean.pro b/tests/auto/headersclean/headersclean.pro
new file mode 100644
index 0000000000..54ea66a51d
--- /dev/null
+++ b/tests/auto/headersclean/headersclean.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+SOURCES += tst_headersclean.cpp
+QT = core
+
+contains(QT_CONFIG,declarative): QT += declarative
diff --git a/tests/auto/headersclean/tst_headersclean.cpp b/tests/auto/headersclean/tst_headersclean.cpp
new file mode 100644
index 0000000000..68bc9d71a3
--- /dev/null
+++ b/tests/auto/headersclean/tst_headersclean.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 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$
+**
+****************************************************************************/
+
+#define QT_NO_KEYWORDS
+#define signals int
+#define slots int
+#define emit public:;
+#define foreach public:;
+#define forever public:;
+
+#include <QtCore/QtCore>
+#include <QtTest/QtTest>
+
+#include <QtDeclarative/QtDeclarative>
+
+class tst_HeadersClean: public QObject
+{
+ Q_OBJECT
+public:
+ tst_HeadersClean() {}
+};
+
+QTEST_MAIN(tst_HeadersClean)
+#include "tst_headersclean.moc"
diff --git a/tests/auto/host.pro b/tests/auto/host.pro
new file mode 100644
index 0000000000..6bc8753fb0
--- /dev/null
+++ b/tests/auto/host.pro
@@ -0,0 +1,4 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ headersclean \
+
diff --git a/tests/global/global.cfg b/tests/global/global.cfg
new file mode 100644
index 0000000000..80e064a74f
--- /dev/null
+++ b/tests/global/global.cfg
@@ -0,0 +1,5 @@
+<config>
+<modules>
+<module name="QtDeclarative" qtname="declarative"/>
+</modules>
+</config>