summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-22 05:44:14 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-22 05:44:14 (GMT)
commit572ebf1586f4e995527eee126fcf0bd4fdb18bee (patch)
tree39b6d2b81faf1804bb409751e09e91fcadf2f3f7 /tests
parent2cc9a9a51d6742708b1ea41c7338755e2a0ee9e9 (diff)
parent3ba4e43507cc2ca1f642a45aec4fda4bd3572678 (diff)
downloadQt-572ebf1586f4e995527eee126fcf0bd4fdb18bee.zip
Qt-572ebf1586f4e995527eee126fcf0bd4fdb18bee.tar.gz
Qt-572ebf1586f4e995527eee126fcf0bd4fdb18bee.tar.bz2
Merge remote branch 'origin/4.7' into oslo-staging-1
Conflicts: tests/auto/qgl_threads/qgl_threads.pro
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/declarative.pro4
-rw-r--r--tests/auto/declarative/declarative.pro2
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/data/layouts.qml (renamed from tests/auto/declarative/layouts/data/layouts.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro (renamed from tests/auto/declarative/layouts/layouts.pro)2
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp (renamed from tests/auto/declarative/layouts/tst_layouts.cpp)2
-rw-r--r--tests/auto/maketestselftest/features/dump_subdirs.prf4
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp398
-rw-r--r--tests/auto/network.pro2
-rw-r--r--tests/auto/opengl.pro2
-rw-r--r--tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp42
-rw-r--r--tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp24
-rw-r--r--tests/auto/qfiledialog2/tst_qfiledialog2.cpp76
-rw-r--r--tests/auto/qgl_threads/qgl_threads.pro14
-rw-r--r--tests/auto/qglthreads/qglthreads.pro10
-rw-r--r--tests/auto/qglthreads/tst_qglthreads.cpp (renamed from tests/auto/qgl_threads/tst_openglthreading.cpp)16
-rw-r--r--tests/auto/qglthreads/tst_qglthreads.h (renamed from tests/auto/qgl_threads/tst_openglthreading.h)10
-rw-r--r--tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro (renamed from tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro)2
-rw-r--r--tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp (renamed from tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp)2
-rw-r--r--tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp22
-rw-r--r--tests/auto/qtconcurrentmap/tst_qtconcurrentmap.cpp62
-rw-r--r--tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp22
-rw-r--r--tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp24
-rw-r--r--tests/auto/qvectornd/tst_qvectornd.cpp166
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp10
25 files changed, 661 insertions, 260 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 497e720..c0004f7 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -18,6 +18,5 @@ contains(QT_CONFIG, webkit): SUBDIRS += webkit.pro
contains(QT_CONFIG, multimedia): SUBDIRS += multimedia.pro
contains(QT_CONFIG, phonon): SUBDIRS += phonon.pro
contains(QT_CONFIG, svg): SUBDIRS += svg.pro
-contains(QT_CONFIG, declarative): SUBDIRS += declarative
-
+contains(QT_CONFIG, declarative): SUBDIRS += declarative.pro
diff --git a/tests/auto/declarative.pro b/tests/auto/declarative.pro
new file mode 100644
index 0000000..f2173f0
--- /dev/null
+++ b/tests/auto/declarative.pro
@@ -0,0 +1,4 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ declarative \
+
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 36eade8..eb74244 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += \
graphicswidgets \ # Cover
- layouts \ # Cover
parserstress \ # Cover
qmetaobjectbuilder \ # Cover
qdeclarativeanimations \ # Cover
@@ -29,6 +28,7 @@ SUBDIRS += \
qdeclarativeitem \ # Cover
qdeclarativelistview \ # Cover
qdeclarativeloader \ # Cover
+ qdeclarativelayouts \ # Cover
qdeclarativemousearea \ # Cover
qdeclarativeparticles \ # Cover
qdeclarativepathview \ # Cover
diff --git a/tests/auto/declarative/layouts/data/layouts.qml b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
index 1792500..1792500 100644
--- a/tests/auto/declarative/layouts/data/layouts.qml
+++ b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
diff --git a/tests/auto/declarative/layouts/layouts.pro b/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
index f38e155..7276162 100644
--- a/tests/auto/declarative/layouts/layouts.pro
+++ b/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
@@ -1,6 +1,6 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
-SOURCES += tst_layouts.cpp
+SOURCES += tst_qdeclarativelayouts.cpp
macx:CONFIG -= app_bundle
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/layouts/tst_layouts.cpp b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
index 942125f..879047e 100644
--- a/tests/auto/declarative/layouts/tst_layouts.cpp
+++ b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
@@ -144,4 +144,4 @@ QDeclarativeView *tst_QDeclarativeLayouts::createView(const QString &filename)
QTEST_MAIN(tst_QDeclarativeLayouts)
-#include "tst_layouts.moc"
+#include "tst_qdeclarativelayouts.moc"
diff --git a/tests/auto/maketestselftest/features/dump_subdirs.prf b/tests/auto/maketestselftest/features/dump_subdirs.prf
new file mode 100644
index 0000000..2547f58
--- /dev/null
+++ b/tests/auto/maketestselftest/features/dump_subdirs.prf
@@ -0,0 +1,4 @@
+for(dir, SUBDIRS) {
+ message(subdir: $$dir)
+}
+
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
index 8264e27..437e143 100644
--- a/tests/auto/maketestselftest/tst_maketestselftest.cpp
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -44,16 +44,62 @@
#include <QRegExp>
#include <QStringList>
#include <QTest>
+#include <QSet>
+#include <QProcess>
+#include <QDebug>
+
+enum FindSubdirsMode {
+ Flat = 0,
+ Recursive
+};
class tst_MakeTestSelfTest: public QObject
{
Q_OBJECT
private slots:
+ void tests_auto_pro();
+
void tests_pro_files();
void tests_pro_files_data();
+
+ void naming_convention();
+ void naming_convention_data();
+
+private:
+ QStringList find_subdirs(QString const&, FindSubdirsMode, QString const& = QString());
+
+ QSet<QString> all_test_classes;
};
+bool looks_like_testcase(QString const&,QString*);
+bool looks_like_subdirs(QString const&);
+QStringList find_test_class(QString const&);
+
+/*
+ Verify that auto.pro only contains other .pro files (and not directories).
+ We enforce this so that we can process every .pro file other than auto.pro
+ independently and get all the tests.
+ If tests were allowed to appear directly in auto.pro, we'd have the problem
+ that we need to somehow run these tests from auto.pro while preventing
+ recursion into the other .pro files.
+*/
+void tst_MakeTestSelfTest::tests_auto_pro()
+{
+ QStringList subdirsList = find_subdirs(SRCDIR "/../auto.pro", Flat);
+ if (QTest::currentTestFailed()) {
+ return;
+ }
+
+ foreach (QString const& subdir, subdirsList) {
+ QVERIFY2(subdir.endsWith(".pro"), qPrintable(QString(
+ "auto.pro contains a subdir `%1'.\n"
+ "auto.pro must _only_ contain other .pro files, not actual subdirs.\n"
+ "Please move `%1' into some other .pro file referenced by auto.pro."
+ ).arg(subdir)));
+ }
+}
+
/* Verify that all tests are listed somewhere in one of the autotest .pro files */
void tst_MakeTestSelfTest::tests_pro_files()
{
@@ -82,6 +128,8 @@ void tst_MakeTestSelfTest::tests_pro_files()
}
}
+
+
QFAIL(qPrintable(QString(
"Subdir `%1' is missing from tests/auto/*.pro\n"
"This means the test won't be compiled or run on any platform.\n"
@@ -106,5 +154,355 @@ void tst_MakeTestSelfTest::tests_pro_files_data()
}
}
+QString format_list(QStringList const& list)
+{
+ if (list.count() == 1) {
+ return list.at(0);
+ }
+ return QString("one of (%1)").arg(list.join(", "));
+}
+
+void tst_MakeTestSelfTest::naming_convention()
+{
+ QFETCH(QString, subdir);
+ QFETCH(QString, target);
+
+ QDir dir(SRCDIR "/../" + subdir);
+
+ QStringList cppfiles = dir.entryList(QStringList() << "*.h" << "*.cpp");
+ if (cppfiles.isEmpty()) {
+ // Common convention is to have test/test.pro and source files in parent dir
+ if (dir.dirName() == "test") {
+ dir.cdUp();
+ cppfiles = dir.entryList(QStringList() << "*.h" << "*.cpp");
+ }
+
+ if (cppfiles.isEmpty()) {
+ QSKIP("Couldn't locate source files for test", SkipSingle);
+ }
+ }
+
+ QStringList possible_test_classes;
+ foreach (QString const& file, cppfiles) {
+ possible_test_classes << find_test_class(dir.path() + "/" + file);
+ }
+
+ if (possible_test_classes.isEmpty()) {
+ QSKIP(qPrintable(QString("Couldn't locate test class in %1").arg(format_list(cppfiles))), SkipSingle);
+ }
+
+ QVERIFY2(possible_test_classes.contains(target), qPrintable(QString(
+ "TARGET is %1, while test class appears to be %2.\n"
+ "TARGET and test class _must_ match so that all testcase names can be accurately "
+ "determined even if a test fails to compile or run.")
+ .arg(target)
+ .arg(format_list(possible_test_classes))
+ ));
+
+ QVERIFY2(!all_test_classes.contains(target), qPrintable(QString(
+ "It looks like there are multiple tests named %1.\n"
+ "This makes it impossible to separate results for these tests.\n"
+ "Please ensure all tests are uniquely named.")
+ .arg(target)
+ ));
+
+ all_test_classes << target;
+}
+
+void tst_MakeTestSelfTest::naming_convention_data()
+{
+ QTest::addColumn<QString>("subdir");
+ QTest::addColumn<QString>("target");
+
+ foreach (const QString& subdir, find_subdirs(SRCDIR "/../auto.pro", Recursive)) {
+ if (QFileInfo(SRCDIR "/../" + subdir).isDir()) {
+ QString target;
+ if (looks_like_testcase(SRCDIR "/../" + subdir + "/" + QFileInfo(subdir).baseName() + ".pro", &target)) {
+ QTest::newRow(qPrintable(subdir)) << subdir << target.toLower();
+ }
+ }
+ }
+}
+
+/*
+ Returns true if a .pro file seems to be for an autotest.
+ Running qmake to figure this out takes too long.
+*/
+bool looks_like_testcase(QString const& pro_file, QString* target)
+{
+ QFile file(pro_file);
+ if (!file.open(QIODevice::ReadOnly)) {
+ return false;
+ }
+
+ *target = QString();
+
+ bool loaded_qttest = false;
+
+ do {
+ QByteArray line = file.readLine();
+ if (line.isEmpty()) {
+ break;
+ }
+
+ line = line.trimmed();
+ line.replace(' ', "");
+
+ if (line == "load(qttest_p4)") {
+ loaded_qttest = true;
+ }
+
+ if (line.startsWith("TARGET=")) {
+ *target = QString::fromLatin1(line.mid(sizeof("TARGET=")-1));
+ if (target->contains('/')) {
+ *target = target->right(target->lastIndexOf('/')+1);
+ }
+ }
+
+ if (loaded_qttest && !target->isEmpty()) {
+ break;
+ }
+ } while(1);
+
+ if (!loaded_qttest) {
+ return false;
+ }
+
+ if (!target->isEmpty() && !target->startsWith("tst_")) {
+ return false;
+ }
+
+ // If no target was set, default to tst_<dirname>
+ if (target->isEmpty()) {
+ *target = "tst_" + QFileInfo(pro_file).baseName();
+ }
+
+ return true;
+}
+
+/*
+ Returns true if a .pro file seems to be a subdirs project.
+ Running qmake to figure this out takes too long.
+*/
+bool looks_like_subdirs(QString const& pro_file)
+{
+ QFile file(pro_file);
+ if (!file.open(QIODevice::ReadOnly)) {
+ return false;
+ }
+
+ do {
+ QByteArray line = file.readLine();
+ if (line.isEmpty()) {
+ break;
+ }
+
+ line = line.trimmed();
+ line.replace(' ', "");
+
+ if (line == "TEMPLATE=subdirs") {
+ return true;
+ }
+ } while(1);
+
+ return false;
+}
+
+/*
+ Returns a list of all subdirs in a given .pro file
+*/
+QStringList tst_MakeTestSelfTest::find_subdirs(QString const& pro_file, FindSubdirsMode mode, QString const& prefix)
+{
+ QStringList out;
+
+ QByteArray features = qgetenv("QMAKEFEATURES");
+
+ if (features.isEmpty()) {
+ features = SRCDIR "/features";
+ }
+ else {
+ features.prepend(SRCDIR "/features"
+#ifdef Q_OS_WIN32
+ ";"
+#else
+ ":"
+#endif
+ );
+ }
+
+ QStringList args;
+ args << pro_file << "-o" << SRCDIR "/dummy_output" << "CONFIG+=dump_subdirs";
+
+ /* Turn on every option there is, to ensure we process every single directory */
+ args
+ << "QT_CONFIG+=dbus"
+ << "QT_CONFIG+=declarative"
+ << "QT_CONFIG+=egl"
+ << "QT_CONFIG+=multimedia"
+ << "QT_CONFIG+=OdfWriter"
+ << "QT_CONFIG+=opengl"
+ << "QT_CONFIG+=openvg"
+ << "QT_CONFIG+=phonon"
+ << "QT_CONFIG+=private_tests"
+ << "QT_CONFIG+=pulseaudio"
+ << "QT_CONFIG+=qt3support"
+ << "QT_CONFIG+=script"
+ << "QT_CONFIG+=svg"
+ << "QT_CONFIG+=webkit"
+ << "QT_CONFIG+=xmlpatterns"
+ << "CONFIG+=mac"
+ << "CONFIG+=embedded"
+ << "CONFIG+=symbian"
+ ;
+
+
+
+ QString cmd_with_args = QString("qmake %1").arg(args.join(" "));
+
+ QProcess proc;
+
+ proc.setProcessChannelMode(QProcess::MergedChannels);
+
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ env.insert("QMAKEFEATURES", features);
+ proc.setProcessEnvironment(env);
+
+ proc.start("qmake", args);
+ if (!proc.waitForStarted(10000)) {
+ QTest::qFail(qPrintable(QString("Failed to run qmake: %1\nCommand: %2")
+ .arg(proc.errorString())
+ .arg(cmd_with_args)),
+ __FILE__, __LINE__
+ );
+ return out;
+ }
+ if (!proc.waitForFinished(30000)) {
+ QTest::qFail(qPrintable(QString("qmake did not finish within 30 seconds\nCommand: %1\nOutput: %2")
+ .arg(proc.errorString())
+ .arg(cmd_with_args)
+ .arg(QString::fromLocal8Bit(proc.readAll()))),
+ __FILE__, __LINE__
+ );
+ return out;
+ }
+
+ if (proc.exitStatus() != QProcess::NormalExit) {
+ QTest::qFail(qPrintable(QString("qmake crashed\nCommand: %1\nOutput: %2")
+ .arg(cmd_with_args)
+ .arg(QString::fromLocal8Bit(proc.readAll()))),
+ __FILE__, __LINE__
+ );
+ return out;
+ }
+
+ if (proc.exitCode() != 0) {
+ QTest::qFail(qPrintable(QString("qmake exited with code %1\nCommand: %2\nOutput: %3")
+ .arg(proc.exitCode())
+ .arg(cmd_with_args)
+ .arg(QString::fromLocal8Bit(proc.readAll()))),
+ __FILE__, __LINE__
+ );
+ return out;
+ }
+
+ QList<QByteArray> lines = proc.readAll().split('\n');
+ if (!lines.count()) {
+ QTest::qFail(qPrintable(QString("qmake seems to have not output anything\nCommand: %1\n")
+ .arg(cmd_with_args)),
+ __FILE__, __LINE__
+ );
+ return out;
+ }
+
+ foreach (QByteArray const& line, lines) {
+ static const QByteArray marker = "Project MESSAGE: subdir: ";
+ if (line.startsWith(marker)) {
+ QString subdir = QString::fromLocal8Bit(line.mid(marker.size()).trimmed());
+ out << prefix + subdir;
+
+ if (mode == Flat) {
+ continue;
+ }
+
+ // Need full path to subdir
+ QString subdir_filepath = subdir;
+ subdir_filepath.prepend(QFileInfo(pro_file).path() + "/");
+
+ // Add subdirs recursively
+ if (subdir.endsWith(".pro") && looks_like_subdirs(subdir_filepath)) {
+ // Need full path to .pro file
+ out << find_subdirs(subdir_filepath, mode, prefix);
+ }
+
+ if (QFileInfo(subdir_filepath).isDir()) {
+ subdir_filepath += "/" + subdir + ".pro";
+ if (looks_like_subdirs(subdir_filepath)) {
+ out << find_subdirs(subdir_filepath, mode, prefix + subdir + "/");
+ }
+ }
+ }
+ }
+
+ return out;
+}
+
+QStringList find_test_class(QString const& filename)
+{
+ QStringList out;
+
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly)) {
+ return out;
+ }
+
+ static char const* klass_indicators[] = {
+ "QTEST_MAIN(",
+ "QTEST_APPLESS_MAIN(",
+ "class",
+ "staticconstcharklass[]=\"", /* hax0r tests which define their own metaobject */
+ 0
+ };
+
+ do {
+ QByteArray line = file.readLine();
+ if (line.isEmpty()) {
+ break;
+ }
+
+ line = line.trimmed();
+ line.replace(' ', "");
+
+ for (int i = 0; klass_indicators[i]; ++i) {
+ char const* prefix = klass_indicators[i];
+ if (!line.startsWith(prefix)) {
+ continue;
+ }
+ QByteArray klass = line.mid(strlen(prefix));
+ if (!klass.startsWith("tst_")) {
+ continue;
+ }
+ for (int j = 0; j < klass.size(); ++j) {
+ char c = klass[j];
+ if (c == '_'
+ || (c >= '0' && c <= '9')
+ || (c >= 'A' && c <= 'Z')
+ || (c >= 'a' && c <= 'z')) {
+ continue;
+ }
+ else {
+ klass.truncate(j);
+ break;
+ }
+ }
+ QString klass_str = QString::fromLocal8Bit(klass).toLower();
+ if (!out.contains(klass_str))
+ out << klass_str;
+ break;
+ }
+ } while(1);
+
+ return out;
+}
+
QTEST_MAIN(tst_MakeTestSelfTest)
#include "tst_maketestselftest.moc"
diff --git a/tests/auto/network.pro b/tests/auto/network.pro
index 2a7c178..4f205fe 100644
--- a/tests/auto/network.pro
+++ b/tests/auto/network.pro
@@ -18,8 +18,8 @@ SUBDIRS=\
qnativesocketengine \
qnetworkaccessmanager \
qnetworkaddressentry \
- qnetworkconfigmanager \
qnetworkconfiguration \
+ qnetworkconfigurationmanager \
qnetworkcookie \
qnetworkcookiejar \
qnetworkinterface \
diff --git a/tests/auto/opengl.pro b/tests/auto/opengl.pro
index 7220c45..9b59cd1 100644
--- a/tests/auto/opengl.pro
+++ b/tests/auto/opengl.pro
@@ -1,6 +1,6 @@
TEMPLATE=subdirs
SUBDIRS=\
qgl \
- qgl_threads \
+ qglthreads \
qglbuffer \
diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
index a215bd5..af0ed76 100644
--- a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -49,7 +49,7 @@
#include <QtMultimedia/qmetadatacontrol.h>
-class tst_QmlAudio : public QObject
+class tst_QDeclarativeAudio : public QObject
{
Q_OBJECT
public slots:
@@ -285,12 +285,12 @@ public:
};
-void tst_QmlAudio::initTestCase()
+void tst_QDeclarativeAudio::initTestCase()
{
qRegisterMetaType<QDeclarativeAudio::Error>();
}
-void tst_QmlAudio::nullPlayerControl()
+void tst_QDeclarativeAudio::nullPlayerControl()
{
QtTestMetaDataControl metaDataControl;
QtTestMediaServiceProvider provider(0, &metaDataControl);
@@ -339,7 +339,7 @@ void tst_QmlAudio::nullPlayerControl()
QCOMPARE(audio.error(), QDeclarativeAudio::ServiceMissing);
}
-void tst_QmlAudio::nullMetaDataControl()
+void tst_QDeclarativeAudio::nullMetaDataControl()
{
QtTestMediaPlayerControl playerControl;
QtTestMediaServiceProvider provider(&playerControl, 0);
@@ -351,7 +351,7 @@ void tst_QmlAudio::nullMetaDataControl()
QCOMPARE(audio.metaObject()->indexOfProperty("description"), -1);
}
-void tst_QmlAudio::nullService()
+void tst_QDeclarativeAudio::nullService()
{
QtTestMediaServiceProvider provider(0);
@@ -403,7 +403,7 @@ void tst_QmlAudio::nullService()
QCOMPARE(audio.metaObject()->indexOfProperty("description"), -1);
}
-void tst_QmlAudio::source()
+void tst_QDeclarativeAudio::source()
{
const QUrl url1("http://example.com");
const QUrl url2("file:///local/path");
@@ -431,7 +431,7 @@ void tst_QmlAudio::source()
QCOMPARE(spy.count(), 3);
}
-void tst_QmlAudio::autoLoad()
+void tst_QDeclarativeAudio::autoLoad()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -458,7 +458,7 @@ void tst_QmlAudio::autoLoad()
QCOMPARE(audio.isPaused(), true);
}
-void tst_QmlAudio::playing()
+void tst_QDeclarativeAudio::playing()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -547,7 +547,7 @@ void tst_QmlAudio::playing()
QCOMPARE(stoppedSpy.count(), stopped);
}
-void tst_QmlAudio::paused()
+void tst_QDeclarativeAudio::paused()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -836,7 +836,7 @@ void tst_QmlAudio::paused()
QCOMPARE(stoppedSpy.count(), stopped);
}
-void tst_QmlAudio::duration()
+void tst_QDeclarativeAudio::duration()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -865,7 +865,7 @@ void tst_QmlAudio::duration()
QCOMPARE(spy.count(), 4);
}
-void tst_QmlAudio::position()
+void tst_QDeclarativeAudio::position()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -909,7 +909,7 @@ void tst_QmlAudio::position()
QVERIFY(spy.count() < 6);
}
-void tst_QmlAudio::volume()
+void tst_QDeclarativeAudio::volume()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -934,7 +934,7 @@ void tst_QmlAudio::volume()
QCOMPARE(spy.count(), 2);
}
-void tst_QmlAudio::muted()
+void tst_QDeclarativeAudio::muted()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -959,7 +959,7 @@ void tst_QmlAudio::muted()
QCOMPARE(spy.count(), 3);
}
-void tst_QmlAudio::bufferProgress()
+void tst_QDeclarativeAudio::bufferProgress()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -994,7 +994,7 @@ void tst_QmlAudio::bufferProgress()
QVERIFY(spy.count() < 6);
}
-void tst_QmlAudio::seekable()
+void tst_QDeclarativeAudio::seekable()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -1018,7 +1018,7 @@ void tst_QmlAudio::seekable()
QCOMPARE(spy.count(), 3);
}
-void tst_QmlAudio::playbackRate()
+void tst_QDeclarativeAudio::playbackRate()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -1044,7 +1044,7 @@ void tst_QmlAudio::playbackRate()
QCOMPARE(spy.count(), 3);
}
-void tst_QmlAudio::status()
+void tst_QDeclarativeAudio::status()
{
QtTestMediaServiceProvider provider;
QDeclarativeAudio audio;
@@ -1153,7 +1153,7 @@ void tst_QmlAudio::status()
QCOMPARE(endOfMediaSpy.count(), 1);
}
-void tst_QmlAudio::metaData_data()
+void tst_QDeclarativeAudio::metaData_data()
{
QTest::addColumn<QByteArray>("propertyName");
QTest::addColumn<QtMultimedia::MetaData>("propertyKey");
@@ -1179,7 +1179,7 @@ void tst_QmlAudio::metaData_data()
<< QVariant(12);
}
-void tst_QmlAudio::metaData()
+void tst_QDeclarativeAudio::metaData()
{
QFETCH(QByteArray, propertyName);
QFETCH(QtMultimedia::MetaData, propertyKey);
@@ -1209,7 +1209,7 @@ void tst_QmlAudio::metaData()
QCOMPARE(spy.count(), 2);
}
-void tst_QmlAudio::error()
+void tst_QDeclarativeAudio::error()
{
const QString errorString = QLatin1String("Failed to open device.");
@@ -1247,6 +1247,6 @@ void tst_QmlAudio::error()
}
-QTEST_MAIN(tst_QmlAudio)
+QTEST_MAIN(tst_QDeclarativeAudio)
#include "tst_qdeclarativeaudio.moc"
diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
index 56dce28..0fbd78c 100644
--- a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
+++ b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
@@ -53,7 +53,7 @@
#include <QtMultimedia/qvideosurfaceformat.h>
-class tst_QmlGraphicsVideo : public QObject
+class tst_QDeclarativeVideo : public QObject
{
Q_OBJECT
public slots:
@@ -291,12 +291,12 @@ public:
};
-void tst_QmlGraphicsVideo::initTestCase()
+void tst_QDeclarativeVideo::initTestCase()
{
qRegisterMetaType<QDeclarativeVideo::Error>();
}
-void tst_QmlGraphicsVideo::nullPlayerControl()
+void tst_QDeclarativeVideo::nullPlayerControl()
{
QtTestMediaServiceProvider provider(0, 0, 0);
@@ -347,7 +347,7 @@ void tst_QmlGraphicsVideo::nullPlayerControl()
QCOMPARE(video.error(), QDeclarativeVideo::ServiceMissing);
}
-void tst_QmlGraphicsVideo::nullService()
+void tst_QDeclarativeVideo::nullService()
{
QtTestMediaServiceProvider provider(0);
@@ -402,7 +402,7 @@ void tst_QmlGraphicsVideo::nullService()
QCOMPARE(video.metaObject()->indexOfProperty("description"), -1);
}
-void tst_QmlGraphicsVideo::playing()
+void tst_QDeclarativeVideo::playing()
{
QtTestMediaServiceProvider provider;
QDeclarativeVideo video;
@@ -490,7 +490,7 @@ void tst_QmlGraphicsVideo::playing()
QCOMPARE(stoppedSpy.count(), stopped);
}
-void tst_QmlGraphicsVideo::paused()
+void tst_QDeclarativeVideo::paused()
{
QtTestMediaServiceProvider provider;
QDeclarativeVideo video;
@@ -778,7 +778,7 @@ void tst_QmlGraphicsVideo::paused()
QCOMPARE(stoppedSpy.count(), stopped);
}
-void tst_QmlGraphicsVideo::error()
+void tst_QDeclarativeVideo::error()
{
const QString errorString = QLatin1String("Failed to open device.");
@@ -815,7 +815,7 @@ void tst_QmlGraphicsVideo::error()
}
-void tst_QmlGraphicsVideo::hasAudio()
+void tst_QDeclarativeVideo::hasAudio()
{
QtTestMediaServiceProvider provider;
QDeclarativeVideo video;
@@ -838,7 +838,7 @@ void tst_QmlGraphicsVideo::hasAudio()
QCOMPARE(spy.count(), 3);
}
-void tst_QmlGraphicsVideo::hasVideo()
+void tst_QDeclarativeVideo::hasVideo()
{
QtTestMediaServiceProvider provider;
QDeclarativeVideo video;
@@ -862,7 +862,7 @@ void tst_QmlGraphicsVideo::hasVideo()
QCOMPARE(spy.count(), 3);
}
-void tst_QmlGraphicsVideo::fillMode()
+void tst_QDeclarativeVideo::fillMode()
{
QtTestMediaServiceProvider provider;
QDeclarativeVideo video;
@@ -888,7 +888,7 @@ void tst_QmlGraphicsVideo::fillMode()
QCOMPARE(videoItem->aspectRatioMode(), Qt::KeepAspectRatio);
}
-void tst_QmlGraphicsVideo::geometry()
+void tst_QDeclarativeVideo::geometry()
{
QtTestMediaServiceProvider provider;
QDeclarativeVideo video;
@@ -916,6 +916,6 @@ void tst_QmlGraphicsVideo::geometry()
QCOMPARE(videoItem->size().height(), qreal(328));
}
-QTEST_MAIN(tst_QmlGraphicsVideo)
+QTEST_MAIN(tst_QDeclarativeVideo)
#include "tst_qdeclarativevideo.moc"
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
index f2e1dbd..6bfa8be 100644
--- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
@@ -87,13 +87,13 @@ public:
}
};
-class tst_QFiledialog : public QObject
+class tst_QFileDialog2 : public QObject
{
Q_OBJECT
public:
- tst_QFiledialog();
- virtual ~tst_QFiledialog();
+ tst_QFileDialog2();
+ virtual ~tst_QFileDialog2();
public slots:
void init();
@@ -138,18 +138,18 @@ private:
QByteArray userSettings;
};
-tst_QFiledialog::tst_QFiledialog()
+tst_QFileDialog2::tst_QFileDialog2()
{
#if defined(Q_OS_WINCE)
qApp->setAutoMaximizeThreshold(-1);
#endif
}
-tst_QFiledialog::~tst_QFiledialog()
+tst_QFileDialog2::~tst_QFileDialog2()
{
}
-void tst_QFiledialog::init()
+void tst_QFileDialog2::init()
{
// Save the developers settings so they don't get mad when their sidebar folders are gone.
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
@@ -164,14 +164,14 @@ void tst_QFiledialog::init()
#endif
}
-void tst_QFiledialog::cleanup()
+void tst_QFileDialog2::cleanup()
{
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
settings.beginGroup(QLatin1String("Qt"));
settings.setValue(QLatin1String("filedialog"), userSettings);
}
-void tst_QFiledialog::listRoot()
+void tst_QFileDialog2::listRoot()
{
#if defined QT_BUILD_INTERNAL
QFileInfoGatherer fileInfoGatherer;
@@ -193,7 +193,7 @@ void tst_QFiledialog::listRoot()
#endif
}
-void tst_QFiledialog::heapCorruption()
+void tst_QFileDialog2::heapCorruption()
{
QVector<QNonNativeFileDialog*> dialogs;
for (int i=0; i < 10; i++) {
@@ -205,12 +205,12 @@ void tst_QFiledialog::heapCorruption()
struct FriendlyQFileDialog : public QNonNativeFileDialog
{
- friend class tst_QFileDialog;
+ friend class tst_QFileDialog2;
Q_DECLARE_PRIVATE(QFileDialog)
};
-void tst_QFiledialog::deleteDirAndFiles()
+void tst_QFileDialog2::deleteDirAndFiles()
{
#if defined QT_BUILD_INTERNAL
QString tempPath = QDir::tempPath() + '/' + "QFileDialogTestDir4FullDelete";
@@ -242,7 +242,7 @@ void tst_QFiledialog::deleteDirAndFiles()
#endif
}
-void tst_QFiledialog::filter()
+void tst_QFileDialog2::filter()
{
QNonNativeFileDialog fd;
QAction *hiddenAction = qFindChild<QAction*>(&fd, "qt_show_hidden_action");
@@ -255,7 +255,7 @@ void tst_QFiledialog::filter()
QVERIFY(hiddenAction->isChecked());
}
-void tst_QFiledialog::showNameFilterDetails()
+void tst_QFileDialog2::showNameFilterDetails()
{
QNonNativeFileDialog fd;
QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo");
@@ -280,7 +280,7 @@ void tst_QFiledialog::showNameFilterDetails()
QCOMPARE(filters->itemText(2), filterChoices.at(2));
}
-void tst_QFiledialog::unc()
+void tst_QFileDialog2::unc()
{
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Only test UNC on Windows./
@@ -295,7 +295,7 @@ void tst_QFiledialog::unc()
QCOMPARE(model->index(fd.directory().absolutePath()), model->index(dir));
}
-void tst_QFiledialog::emptyUncPath()
+void tst_QFileDialog2::emptyUncPath()
{
QNonNativeFileDialog fd;
fd.show();
@@ -308,7 +308,7 @@ void tst_QFiledialog::emptyUncPath()
QVERIFY(model);
}
-void tst_QFiledialog::task178897_minimumSize()
+void tst_QFileDialog2::task178897_minimumSize()
{
QNonNativeFileDialog fd;
QSize oldMs = fd.layout()->minimumSize();
@@ -322,7 +322,7 @@ void tst_QFiledialog::task178897_minimumSize()
QVERIFY(ms.width() <= oldMs.width());
}
-void tst_QFiledialog::task180459_lastDirectory_data()
+void tst_QFileDialog2::task180459_lastDirectory_data()
{
QTest::addColumn<QString>("path");
QTest::addColumn<QString>("directory");
@@ -345,7 +345,7 @@ void tst_QFiledialog::task180459_lastDirectory_data()
}
-void tst_QFiledialog::task180459_lastDirectory()
+void tst_QFileDialog2::task180459_lastDirectory()
{
//first visit the temp directory and close the dialog
QNonNativeFileDialog *dlg = new QNonNativeFileDialog(0, "", QDir::tempPath());
@@ -449,7 +449,7 @@ QString &dir, const QString &filter)
}
};
-void tst_QFiledialog::task227304_proxyOnFileDialog()
+void tst_QFileDialog2::task227304_proxyOnFileDialog()
{
#if defined QT_BUILD_INTERNAL
QNonNativeFileDialog fd(0, "", QDir::currentPath(), 0);
@@ -488,7 +488,7 @@ void tst_QFiledialog::task227304_proxyOnFileDialog()
#endif
}
-void tst_QFiledialog::task227930_correctNavigationKeyboardBehavior()
+void tst_QFileDialog2::task227930_correctNavigationKeyboardBehavior()
{
QDir current = QDir::currentPath();
current.mkdir("test");
@@ -527,7 +527,7 @@ void tst_QFiledialog::task227930_correctNavigationKeyboardBehavior()
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-void tst_QFiledialog::task226366_lowerCaseHardDriveWindows()
+void tst_QFileDialog2::task226366_lowerCaseHardDriveWindows()
{
QNonNativeFileDialog fd;
fd.setDirectory(QDir::root().path());
@@ -553,7 +553,7 @@ void tst_QFiledialog::task226366_lowerCaseHardDriveWindows()
}
#endif
-void tst_QFiledialog::completionOnLevelAfterRoot()
+void tst_QFileDialog2::completionOnLevelAfterRoot()
{
QNonNativeFileDialog fd;
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
@@ -592,7 +592,7 @@ void tst_QFiledialog::completionOnLevelAfterRoot()
#endif
}
-void tst_QFiledialog::task233037_selectingDirectory()
+void tst_QFileDialog2::task233037_selectingDirectory()
{
QDir current = QDir::currentPath();
current.mkdir("test");
@@ -615,7 +615,7 @@ void tst_QFiledialog::task233037_selectingDirectory()
current.rmdir("test");
}
-void tst_QFiledialog::task235069_hideOnEscape()
+void tst_QFileDialog2::task235069_hideOnEscape()
{
QDir current = QDir::currentPath();
QNonNativeFileDialog fd;
@@ -637,7 +637,7 @@ void tst_QFiledialog::task235069_hideOnEscape()
QCOMPARE(fd2.isVisible(), false);
}
-void tst_QFiledialog::task236402_dontWatchDeletedDir()
+void tst_QFileDialog2::task236402_dontWatchDeletedDir()
{
#if defined QT_BUILD_INTERNAL
//THIS TEST SHOULD NOT DISPLAY WARNINGS
@@ -662,7 +662,7 @@ void tst_QFiledialog::task236402_dontWatchDeletedDir()
#endif
}
-void tst_QFiledialog::task203703_returnProperSeparator()
+void tst_QFileDialog2::task203703_returnProperSeparator()
{
QDir current = QDir::currentPath();
current.mkdir("aaaaaaaaaaaaaaaaaa");
@@ -687,7 +687,7 @@ void tst_QFiledialog::task203703_returnProperSeparator()
current.rmdir("aaaaaaaaaaaaaaaaaa");
}
-void tst_QFiledialog::task228844_ensurePreviousSorting()
+void tst_QFileDialog2::task228844_ensurePreviousSorting()
{
QDir current = QDir::currentPath();
current.mkdir("aaaaaaaaaaaaaaaaaa");
@@ -789,7 +789,7 @@ void tst_QFiledialog::task228844_ensurePreviousSorting()
}
-void tst_QFiledialog::task239706_editableFilterCombo()
+void tst_QFileDialog2::task239706_editableFilterCombo()
{
QNonNativeFileDialog d;
d.setNameFilter("*.cpp *.h");
@@ -812,7 +812,7 @@ void tst_QFiledialog::task239706_editableFilterCombo()
QTest::keyPress(filterCombo, Qt::Key_Enter); // should not trigger assertion failure
}
-void tst_QFiledialog::task218353_relativePaths()
+void tst_QFileDialog2::task218353_relativePaths()
{
QDir appDir = QDir::current();
QVERIFY(appDir.cdUp() != false);
@@ -829,7 +829,7 @@ void tst_QFiledialog::task218353_relativePaths()
appDir.rmdir("test");
}
-void tst_QFiledialog::task251321_sideBarHiddenEntries()
+void tst_QFileDialog2::task251321_sideBarHiddenEntries()
{
#if defined QT_BUILD_INTERNAL
QNonNativeFileDialog fd;
@@ -889,7 +889,7 @@ public :
};
#endif
-void tst_QFiledialog::task251341_sideBarRemoveEntries()
+void tst_QFileDialog2::task251341_sideBarRemoveEntries()
{
#if defined QT_BUILD_INTERNAL
QNonNativeFileDialog fd;
@@ -954,7 +954,7 @@ void tst_QFiledialog::task251341_sideBarRemoveEntries()
#endif
}
-void tst_QFiledialog::task254490_selectFileMultipleTimes()
+void tst_QFileDialog2::task254490_selectFileMultipleTimes()
{
QString tempPath = QDir::tempPath();
QTemporaryFile *t;
@@ -986,7 +986,7 @@ void tst_QFiledialog::task254490_selectFileMultipleTimes()
t->deleteLater();
}
-void tst_QFiledialog::task257579_sideBarWithNonCleanUrls()
+void tst_QFileDialog2::task257579_sideBarWithNonCleanUrls()
{
#if defined QT_BUILD_INTERNAL
QDir tempDir = QDir::temp();
@@ -1012,7 +1012,7 @@ void tst_QFiledialog::task257579_sideBarWithNonCleanUrls()
#endif
}
-void tst_QFiledialog::task259105_filtersCornerCases()
+void tst_QFileDialog2::task259105_filtersCornerCases()
{
QNonNativeFileDialog fd(0, "TestFileDialog");
fd.setNameFilter(QLatin1String("All Files! (*);;Text Files (*.txt)"));
@@ -1056,7 +1056,7 @@ void tst_QFiledialog::task259105_filtersCornerCases()
QCOMPARE(filters->currentText(), QLatin1String("Text Files"));
}
-void tst_QFiledialog::QTBUG4419_lineEditSelectAll()
+void tst_QFileDialog2::QTBUG4419_lineEditSelectAll()
{
QString tempPath = QDir::tempPath();
QTemporaryFile *t;
@@ -1082,7 +1082,7 @@ void tst_QFiledialog::QTBUG4419_lineEditSelectAll()
QCOMPARE(tempPath + QChar('/') + lineEdit->selectedText(), t->fileName());
}
-void tst_QFiledialog::QTBUG6558_showDirsOnly()
+void tst_QFileDialog2::QTBUG6558_showDirsOnly()
{
const QString tempPath = QDir::tempPath();
QDir dirTemp(tempPath);
@@ -1148,7 +1148,7 @@ void tst_QFiledialog::QTBUG6558_showDirsOnly()
dirTemp.rmdir(tempName);
}
-void tst_QFiledialog::QTBUG4842_selectFilterWithHideNameFilterDetails()
+void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails()
{
QStringList filtersStr;
filtersStr << "Images (*.png *.xpm *.jpg)" << "Text files (*.txt)" << "XML files (*.xml)";
@@ -1188,5 +1188,5 @@ void tst_QFiledialog::QTBUG4842_selectFilterWithHideNameFilterDetails()
}
-QTEST_MAIN(tst_QFiledialog)
+QTEST_MAIN(tst_QFileDialog2)
#include "tst_qfiledialog2.moc"
diff --git a/tests/auto/qgl_threads/qgl_threads.pro b/tests/auto/qgl_threads/qgl_threads.pro
deleted file mode 100644
index 83d5d82..0000000
--- a/tests/auto/qgl_threads/qgl_threads.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-############################################################
-# Project file for autotest for file qgl.h
-############################################################
-
-load(qttest_p4)
-requires(contains(QT_CONFIG,opengl))
-QT += opengl
-
-HEADERS += tst_openglthreading.h
-SOURCES += tst_openglthreading.cpp
-
-x11 {
- LIBS += $$QMAKE_LIBS_X11
-}
diff --git a/tests/auto/qglthreads/qglthreads.pro b/tests/auto/qglthreads/qglthreads.pro
new file mode 100644
index 0000000..73b75d4
--- /dev/null
+++ b/tests/auto/qglthreads/qglthreads.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+requires(contains(QT_CONFIG,opengl))
+QT += opengl
+
+HEADERS += tst_qglthreads.h
+SOURCES += tst_qglthreads.cpp
+
+x11 {
+ LIBS += $$QMAKE_LIBS_X11
+}
diff --git a/tests/auto/qgl_threads/tst_openglthreading.cpp b/tests/auto/qglthreads/tst_qglthreads.cpp
index cf100cb..cce3161 100644
--- a/tests/auto/qgl_threads/tst_openglthreading.cpp
+++ b/tests/auto/qglthreads/tst_qglthreads.cpp
@@ -43,7 +43,7 @@
#include <QtCore/QtCore>
#include <QtGui/QtGui>
#include <QtOpenGL/QtOpenGL>
-#include "tst_openglthreading.h"
+#include "tst_qglthreads.h"
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
@@ -51,7 +51,7 @@
#define RUNNING_TIME 5000
-tst_OpenGLThreading::tst_OpenGLThreading(QObject *parent)
+tst_QGLThreads::tst_QGLThreads(QObject *parent)
: QObject(parent)
{
}
@@ -143,7 +143,7 @@ public:
SwapThread *m_thread;
};
-void tst_OpenGLThreading::swapInThread()
+void tst_QGLThreads::swapInThread()
{
#ifdef Q_OS_MAC
QSKIP("OpenGL threading tests are currently disabled on mac as they were causing reboots", SkipAll);
@@ -249,7 +249,7 @@ private:
QList <QPoint> m_positions;
};
-void tst_OpenGLThreading::textureUploadInThread()
+void tst_QGLThreads::textureUploadInThread()
{
#ifdef Q_OS_MAC
QSKIP("OpenGL threading tests are currently disabled on mac as they were causing reboots", SkipAll);
@@ -412,7 +412,7 @@ private:
QSize m_size;
};
-void tst_OpenGLThreading::renderInThread_data()
+void tst_QGLThreads::renderInThread_data()
{
QTest::addColumn<bool>("resize");
QTest::addColumn<bool>("update");
@@ -423,7 +423,7 @@ void tst_OpenGLThreading::renderInThread_data()
QTest::newRow("with-resize-and-update") << true << true;
}
-void tst_OpenGLThreading::renderInThread()
+void tst_QGLThreads::renderInThread()
{
#ifdef Q_OS_MAC
QSKIP("OpenGL threading tests are currently disabled on mac as they were causing reboots", SkipAll);
@@ -473,8 +473,8 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
QTEST_DISABLE_KEYPAD_NAVIGATION \
- tst_OpenGLThreading tc;
+ tst_QGLThreads tc;
return QTest::qExec(&tc, argc, argv);
}
-#include "tst_openglthreading.moc"
+#include "tst_qglthreads.moc"
diff --git a/tests/auto/qgl_threads/tst_openglthreading.h b/tests/auto/qglthreads/tst_qglthreads.h
index c4b55cd..9e97909 100644
--- a/tests/auto/qgl_threads/tst_openglthreading.h
+++ b/tests/auto/qglthreads/tst_qglthreads.h
@@ -39,16 +39,16 @@
**
****************************************************************************/
-#ifndef TST_OPENGLTHREADING_H
-#define TST_OPENGLTHREADING_H
+#ifndef TST_QGLTHREADS_H
+#define TST_QGLTHREADS_H
#include <QObject>
-class tst_OpenGLThreading : public QObject
+class tst_QGLThreads : public QObject
{
Q_OBJECT
public:
- explicit tst_OpenGLThreading(QObject *parent = 0);
+ explicit tst_QGLThreads(QObject *parent = 0);
private slots:
void swapInThread();
@@ -58,4 +58,4 @@ private slots:
void renderInThread();
};
-#endif // TST_OPENGLTHREADING_H
+#endif // TST_QGLTHREADS_H
diff --git a/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro b/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
index 30eb5f0..e0028e5 100644
--- a/tests/auto/qnetworkconfigmanager/qnetworkconfigmanager.pro
+++ b/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
-SOURCES += tst_qnetworkconfigmanager.cpp
+SOURCES += tst_qnetworkconfigurationmanager.cpp
HEADERS += ../qbearertestcommon.h
QT = core network
diff --git a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index b11868a..30c5a74 100644
--- a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
+++ b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -330,4 +330,4 @@ void tst_QNetworkConfigurationManager::configurationFromIdentifier()
QTEST_MAIN(tst_QNetworkConfigurationManager)
-#include "tst_qnetworkconfigmanager.moc"
+#include "tst_qnetworkconfigurationmanager.moc"
diff --git a/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index 29cb341..4f7822d 100644
--- a/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -90,7 +90,7 @@ int distance(TestIterator &a, TestIterator &b)
using namespace QtConcurrent;
-class tst_iteratekernel: public QObject
+class tst_QtConcurrentIterateKernel: public QObject
{
Q_OBJECT
private slots:
@@ -149,13 +149,13 @@ public:
};
-void tst_iteratekernel::instantiate()
+void tst_QtConcurrentIterateKernel::instantiate()
{
startThreadEngine(new PrintFor(0, 40)).startBlocking();
QCOMPARE((int)iterations, 40);
}
-void tst_iteratekernel::cancel()
+void tst_QtConcurrentIterateKernel::cancel()
{
{
QFuture<void> f = startThreadEngine(new SleepPrintFor(0, 40)).startAsynchronously();
@@ -182,7 +182,7 @@ public:
}
};
-void tst_iteratekernel::stresstest()
+void tst_QtConcurrentIterateKernel::stresstest()
{
const int iterations = 1000;
const int times = 50;
@@ -194,7 +194,7 @@ void tst_iteratekernel::stresstest()
}
}
-void tst_iteratekernel::noIterations()
+void tst_QtConcurrentIterateKernel::noIterations()
{
const int times = 20000;
for (int i = 0; i < times; ++i)
@@ -242,7 +242,7 @@ public:
bool throttling;
};
-void tst_iteratekernel::throttling()
+void tst_QtConcurrentIterateKernel::throttling()
{
const int totalIterations = 400;
iterations = 0;
@@ -271,7 +271,7 @@ public:
}
};
-void tst_iteratekernel::blockSize()
+void tst_QtConcurrentIterateKernel::blockSize()
{
#ifdef QT_NO_STL
QSKIP("Missing stl iterators prevent correct block size calculation", SkipAll);
@@ -296,7 +296,7 @@ public:
};
-void tst_iteratekernel::multipleResults()
+void tst_QtConcurrentIterateKernel::multipleResults()
{
#ifdef QT_NO_STL
QSKIP("Missing stl iterators prevent correct summation", SkipAll);
@@ -320,7 +320,7 @@ public:
}
};
-void tst_iteratekernel::instantiateWhile()
+void tst_QtConcurrentIterateKernel::instantiateWhile()
{
PrintWhile w;
w.startBlocking();
@@ -339,7 +339,7 @@ public:
}
};
-void tst_iteratekernel::stresstestWhile()
+void tst_QtConcurrentIterateKernel::stresstestWhile()
{
int iterations = 100000;
StressWhile w(iterations);
@@ -348,7 +348,7 @@ void tst_iteratekernel::stresstestWhile()
}
#endif
-QTEST_MAIN(tst_iteratekernel)
+QTEST_MAIN(tst_QtConcurrentIterateKernel)
#include "tst_qtconcurrentiteratekernel.moc"
diff --git a/tests/auto/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/qtconcurrentmap/tst_qtconcurrentmap.cpp
index d3417b1..894bac4 100644
--- a/tests/auto/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -56,7 +56,7 @@ Q_DECLARE_METATYPE(QList<int>);
Q_DECLARE_METATYPE(QList<double>);
Q_DECLARE_METATYPE(QList<QString>);
-class tst_map: public QObject
+class tst_QtConcurrentMap: public QObject
{
Q_OBJECT
private slots:
@@ -114,7 +114,7 @@ public:
Q_DECLARE_METATYPE(QList<Number>);
-void tst_map::map()
+void tst_QtConcurrentMap::map()
{
// functors take arguments by reference, modifying the sequence in place
{
@@ -246,7 +246,7 @@ void tst_map::map()
#endif
}
-void tst_map::blocking_map()
+void tst_QtConcurrentMap::blocking_map()
{
// functors take arguments by reference, modifying the sequence in place
{
@@ -428,7 +428,7 @@ public:
}
};
-void tst_map::mapped()
+void tst_QtConcurrentMap::mapped()
{
QList<int> list;
list << 1 << 2 << 3;
@@ -790,7 +790,7 @@ void tst_map::mapped()
}
}
-void tst_map::blocking_mapped()
+void tst_QtConcurrentMap::blocking_mapped()
{
QList<int> list;
list << 1 << 2 << 3;
@@ -1244,7 +1244,7 @@ public:
}
};
-void tst_map::mappedReduced()
+void tst_QtConcurrentMap::mappedReduced()
{
QList<int> list;
list << 1 << 2 << 3;
@@ -1625,7 +1625,7 @@ void tst_map::mappedReduced()
// ### the same as above, with an initial result value
}
-void tst_map::blocking_mappedReduced()
+void tst_QtConcurrentMap::blocking_mappedReduced()
{
QList<int> list;
list << 1 << 2 << 3;
@@ -2010,7 +2010,7 @@ int sleeper(int val)
return val;
}
-void tst_map::assignResult()
+void tst_QtConcurrentMap::assignResult()
{
const QList<int> startList = QList<int>() << 0 << 1 << 2;
QList<int> list = QtConcurrent::blockingMapped(startList, sleeper);
@@ -2077,7 +2077,7 @@ public:
Q_DECLARE_METATYPE(QVector<MemFnTester>);
Q_DECLARE_METATYPE(QList<MemFnTester>);
-void tst_map::functionOverloads()
+void tst_QtConcurrentMap::functionOverloads()
{
QList<int> intList;
const QList<int> constIntList;
@@ -2159,7 +2159,7 @@ void fastReduce(int &result, const InstanceCounter&)
++result;
}
-void tst_map::throttling()
+void tst_QtConcurrentMap::throttling()
{
const int itemcount = 100;
const int allowedTemporaries = QThread::idealThreadCount() * 40;
@@ -2208,7 +2208,7 @@ void throwMapper(int &e)
throw QtConcurrent::Exception();
}
-void tst_map::exceptions()
+void tst_QtConcurrentMap::exceptions()
{
bool caught = false;
try {
@@ -2228,7 +2228,7 @@ int mapper(const int &i)
return i;
}
-void tst_map::incrementalResults()
+void tst_QtConcurrentMap::incrementalResults()
{
const int count = 200;
QList<int> ints;
@@ -2256,7 +2256,7 @@ void tst_map::incrementalResults()
Test that mapped does not cause deep copies when holding
references to Qt containers.
*/
-void tst_map::noDetatch()
+void tst_QtConcurrentMap::noDetatch()
{
{
QList<int> l = QList<int>() << 1;
@@ -2299,7 +2299,7 @@ void tst_map::noDetatch()
}
-void tst_map::stlContainers()
+void tst_QtConcurrentMap::stlContainers()
{
#ifdef QT_NO_STL
QSKIP("Qt compiled without STL support", SkipAll);
@@ -2331,7 +2331,7 @@ InstanceCounter ic_fn(const InstanceCounter & ic)
// Verify that held results are deleted when a future is
// assigned over with operator ==
-void tst_map::qFutureAssignmentLeak()
+void tst_QtConcurrentMap::qFutureAssignmentLeak()
{
currentInstanceCount = 0;
peakInstanceCount = 0;
@@ -2370,7 +2370,7 @@ void add(int &result, const int &sum)
result += sum;
}
-void tst_map::stressTest()
+void tst_QtConcurrentMap::stressTest()
{
const int listSize = 1000;
const int sum = (listSize - 1) * (listSize / 2);
@@ -2399,26 +2399,26 @@ void tst_map::stressTest()
}
}
-QTEST_MAIN(tst_map)
+QTEST_MAIN(tst_QtConcurrentMap)
#else
-void tst_map::map() {}
-void tst_map::blocking_map() {}
-void tst_map::mapped() {}
-void tst_map::blocking_mapped() {}
-void tst_map::mappedReduced() {}
-void tst_map::blocking_mappedReduced() {}
-void tst_map::assignResult() {}
-void tst_map::functionOverloads() {}
+void tst_QtConcurrentMap::map() {}
+void tst_QtConcurrentMap::blocking_map() {}
+void tst_QtConcurrentMap::mapped() {}
+void tst_QtConcurrentMap::blocking_mapped() {}
+void tst_QtConcurrentMap::mappedReduced() {}
+void tst_QtConcurrentMap::blocking_mappedReduced() {}
+void tst_QtConcurrentMap::assignResult() {}
+void tst_QtConcurrentMap::functionOverloads() {}
#ifndef QT_NO_EXCEPTIONS
-void tst_map::exceptions() {}
+void tst_QtConcurrentMap::exceptions() {}
#endif
-void tst_map::incrementalResults() {}
-void tst_map::stressTest() {}
-void tst_map::throttling() {}
-void tst_map::stlContainers() {}
-void tst_map::noDetatch() {}
+void tst_QtConcurrentMap::incrementalResults() {}
+void tst_QtConcurrentMap::stressTest() {}
+void tst_QtConcurrentMap::throttling() {}
+void tst_QtConcurrentMap::stlContainers() {}
+void tst_QtConcurrentMap::noDetatch() {}
QTEST_NOOP_MAIN
diff --git a/tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp
index b9ab6d3..8fdc50c 100644
--- a/tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -49,7 +49,7 @@
using namespace QtConcurrent;
-class TestRunFunction: public QObject
+class tst_QtConcurrentRun: public QObject
{
Q_OBJECT
private slots:
@@ -73,7 +73,7 @@ private slots:
#endif
-QTEST_MAIN(TestRunFunction)
+QTEST_MAIN(tst_QtConcurrentRun)
void light()
{
@@ -91,7 +91,7 @@ void heavy()
}
-void TestRunFunction::runLightFunction()
+void tst_QtConcurrentRun::runLightFunction()
{
qDebug("starting function");
QFuture<void> future = run(F(light));
@@ -100,7 +100,7 @@ void TestRunFunction::runLightFunction()
qDebug("done");
}
-void TestRunFunction::runHeavyFunction()
+void tst_QtConcurrentRun::runHeavyFunction()
{
qDebug("starting function");
QFuture<void> future = run(F(heavy));
@@ -141,7 +141,7 @@ public:
int operator()(int in) const { return in; }
};
-void TestRunFunction::returnValue()
+void tst_QtConcurrentRun::returnValue()
{
QFuture<int> f;
@@ -217,7 +217,7 @@ struct TestConstClass
void fooInt(int) const { };
};
-void TestRunFunction::functionObject()
+void tst_QtConcurrentRun::functionObject()
{
QFuture<void> f;
TestClass c;
@@ -235,7 +235,7 @@ void TestRunFunction::functionObject()
}
-void TestRunFunction::memberFunctions()
+void tst_QtConcurrentRun::memberFunctions()
{
TestClass c;
@@ -278,7 +278,7 @@ void stringIntFunction(QString)
}
-void TestRunFunction::implicitConvertibleTypes()
+void tst_QtConcurrentRun::implicitConvertibleTypes()
{
double d;
run(F(doubleFunction), d).waitForFinished();
@@ -294,7 +294,7 @@ void TestRunFunction::implicitConvertibleTypes()
void fn() { }
-void TestRunFunction::runWaitLoop()
+void tst_QtConcurrentRun::runWaitLoop()
{
for (int i = 0; i < 1000; ++i)
run(fn).waitForFinished();
@@ -324,7 +324,7 @@ int recursiveResult(int level)
return 1;
}
-void TestRunFunction::recursive()
+void tst_QtConcurrentRun::recursive()
{
int levels = 15;
@@ -375,7 +375,7 @@ int fn2(double, int *)
}
#if 0
-void TestRunFunction::createFunctor()
+void tst_QtConcurrentRun::createFunctor()
{
e = 0;
::QtConcurrent::createFunctor(vfn0)();
diff --git a/tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index 6f586d7..23fd19b 100644
--- a/tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -48,7 +48,7 @@
using namespace QtConcurrent;
-class tst_threadengine: public QObject
+class tst_QtConcurrentThreadEngine: public QObject
{
Q_OBJECT
public:
@@ -79,7 +79,7 @@ public:
}
};
-void tst_threadengine::runDirectly()
+void tst_QtConcurrentThreadEngine::runDirectly()
{
{
PrintUser engine;
@@ -120,7 +120,7 @@ public:
bool done;
};
-void tst_threadengine::result()
+void tst_QtConcurrentThreadEngine::result()
{
StringResultUser engine;
QCOMPARE(*engine.startBlocking(), QString("Foo"));
@@ -147,7 +147,7 @@ public:
bool done;
};
-void tst_threadengine::runThroughStarter()
+void tst_QtConcurrentThreadEngine::runThroughStarter()
{
{
ThreadEngineStarter<QString> starter = startThreadEngine(new StringResultUser());
@@ -180,7 +180,7 @@ public:
}
};
-void tst_threadengine::cancel()
+void tst_QtConcurrentThreadEngine::cancel()
{
{
CancelUser *engine = new CancelUser();
@@ -234,7 +234,7 @@ public:
// Test that a user task with a thread function that always
// want to be throttled still completes. The thread engine
// should make keep one thread running at all times.
-void tst_threadengine::throttle()
+void tst_QtConcurrentThreadEngine::throttle()
{
const int repeats = 10;
for (int i = 0; i < repeats; ++i) {
@@ -280,7 +280,7 @@ public:
bool finishing;
};
-void tst_threadengine::threadCount()
+void tst_QtConcurrentThreadEngine::threadCount()
{
const int repeats = 10;
for (int i = 0; i < repeats; ++i) {
@@ -320,7 +320,7 @@ public:
};
-void tst_threadengine::multipleResults()
+void tst_QtConcurrentThreadEngine::multipleResults()
{
MultipleResultsUser *engine = new MultipleResultsUser();
QFuture<int> f = engine->startAsynchronously();
@@ -351,7 +351,7 @@ public:
}
};
-void tst_threadengine::stresstest()
+void tst_QtConcurrentThreadEngine::stresstest()
{
const int times = 20000;
@@ -379,7 +379,7 @@ public:
ThreadFunctionResult threadFunction() { QTest::qSleep(sleepTime); return ThreadFinished; }
};
-void tst_threadengine::cancelQueuedSlowUser()
+void tst_QtConcurrentThreadEngine::cancelQueuedSlowUser()
{
const int times = 100;
@@ -436,7 +436,7 @@ public:
QThread *blockThread;
};
-void tst_threadengine::exceptions()
+void tst_QtConcurrentThreadEngine::exceptions()
{
// Asynchronous mode:
{
@@ -527,7 +527,7 @@ void tst_threadengine::exceptions()
#endif
-QTEST_MAIN(tst_threadengine)
+QTEST_MAIN(tst_QtConcurrentThreadEngine)
#include "tst_qtconcurrentthreadengine.moc"
diff --git a/tests/auto/qvectornd/tst_qvectornd.cpp b/tests/auto/qvectornd/tst_qvectornd.cpp
index 2be7264..2850f32 100644
--- a/tests/auto/qvectornd/tst_qvectornd.cpp
+++ b/tests/auto/qvectornd/tst_qvectornd.cpp
@@ -45,12 +45,12 @@
#include <QtGui/qvector3d.h>
#include <QtGui/qvector4d.h>
-class tst_QVector : public QObject
+class tst_QVectorND : public QObject
{
Q_OBJECT
public:
- tst_QVector() {}
- ~tst_QVector() {}
+ tst_QVectorND() {}
+ ~tst_QVectorND() {}
private slots:
void create2();
@@ -155,7 +155,7 @@ static bool fuzzyCompare(qreal x, qreal y)
// Test the creation of QVector2D objects in various ways:
// construct, copy, and modify.
-void tst_QVector::create2()
+void tst_QVectorND::create2()
{
QVector2D null;
QCOMPARE(null.x(), (qreal)0.0f);
@@ -244,7 +244,7 @@ void tst_QVector::create2()
// Test the creation of QVector3D objects in various ways:
// construct, copy, and modify.
-void tst_QVector::create3()
+void tst_QVectorND::create3()
{
QVector3D null;
QCOMPARE(null.x(), (qreal)0.0f);
@@ -370,7 +370,7 @@ void tst_QVector::create3()
// Test the creation of QVector4D objects in various ways:
// construct, copy, and modify.
-void tst_QVector::create4()
+void tst_QVectorND::create4()
{
QVector4D null;
QCOMPARE(null.x(), (qreal)0.0f);
@@ -556,7 +556,7 @@ void tst_QVector::create4()
}
// Test vector length computation for 2D vectors.
-void tst_QVector::length2_data()
+void tst_QVectorND::length2_data()
{
QTest::addColumn<qreal>("x");
QTest::addColumn<qreal>("y");
@@ -569,7 +569,7 @@ void tst_QVector::length2_data()
QTest::newRow("-1y") << (qreal)0.0f << (qreal)-1.0f << (qreal)1.0f;
QTest::newRow("two") << (qreal)2.0f << (qreal)-2.0f << (qreal)qSqrt(8.0f);
}
-void tst_QVector::length2()
+void tst_QVectorND::length2()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -581,7 +581,7 @@ void tst_QVector::length2()
}
// Test vector length computation for 3D vectors.
-void tst_QVector::length3_data()
+void tst_QVectorND::length3_data()
{
QTest::addColumn<qreal>("x");
QTest::addColumn<qreal>("y");
@@ -597,7 +597,7 @@ void tst_QVector::length3_data()
QTest::newRow("-1z") << (qreal)0.0f << (qreal)0.0f << (qreal)-1.0f << (qreal)1.0f;
QTest::newRow("two") << (qreal)2.0f << (qreal)-2.0f << (qreal)2.0f << (qreal)qSqrt(12.0f);
}
-void tst_QVector::length3()
+void tst_QVectorND::length3()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -610,7 +610,7 @@ void tst_QVector::length3()
}
// Test vector length computation for 4D vectors.
-void tst_QVector::length4_data()
+void tst_QVectorND::length4_data()
{
QTest::addColumn<qreal>("x");
QTest::addColumn<qreal>("y");
@@ -629,7 +629,7 @@ void tst_QVector::length4_data()
QTest::newRow("-1w") << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f << (qreal)-1.0f << (qreal)1.0f;
QTest::newRow("two") << (qreal)2.0f << (qreal)-2.0f << (qreal)2.0f << (qreal)2.0f << (qreal)qSqrt(16.0f);
}
-void tst_QVector::length4()
+void tst_QVectorND::length4()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -643,12 +643,12 @@ void tst_QVector::length4()
}
// Test the unit vector conversion for 2D vectors.
-void tst_QVector::normalized2_data()
+void tst_QVectorND::normalized2_data()
{
// Use the same test data as the length test.
length2_data();
}
-void tst_QVector::normalized2()
+void tst_QVectorND::normalized2()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -665,12 +665,12 @@ void tst_QVector::normalized2()
}
// Test the unit vector conversion for 3D vectors.
-void tst_QVector::normalized3_data()
+void tst_QVectorND::normalized3_data()
{
// Use the same test data as the length test.
length3_data();
}
-void tst_QVector::normalized3()
+void tst_QVectorND::normalized3()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -689,12 +689,12 @@ void tst_QVector::normalized3()
}
// Test the unit vector conversion for 4D vectors.
-void tst_QVector::normalized4_data()
+void tst_QVectorND::normalized4_data()
{
// Use the same test data as the length test.
length4_data();
}
-void tst_QVector::normalized4()
+void tst_QVectorND::normalized4()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -715,12 +715,12 @@ void tst_QVector::normalized4()
}
// Test the unit vector conversion for 2D vectors.
-void tst_QVector::normalize2_data()
+void tst_QVectorND::normalize2_data()
{
// Use the same test data as the length test.
length2_data();
}
-void tst_QVector::normalize2()
+void tst_QVectorND::normalize2()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -735,12 +735,12 @@ void tst_QVector::normalize2()
}
// Test the unit vector conversion for 3D vectors.
-void tst_QVector::normalize3_data()
+void tst_QVectorND::normalize3_data()
{
// Use the same test data as the length test.
length3_data();
}
-void tst_QVector::normalize3()
+void tst_QVectorND::normalize3()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -756,12 +756,12 @@ void tst_QVector::normalize3()
}
// Test the unit vector conversion for 4D vectors.
-void tst_QVector::normalize4_data()
+void tst_QVectorND::normalize4_data()
{
// Use the same test data as the length test.
length4_data();
}
-void tst_QVector::normalize4()
+void tst_QVectorND::normalize4()
{
QFETCH(qreal, x);
QFETCH(qreal, y);
@@ -778,7 +778,7 @@ void tst_QVector::normalize4()
}
// Test the comparison operators for 2D vectors.
-void tst_QVector::compare2()
+void tst_QVectorND::compare2()
{
QVector2D v1(1, 2);
QVector2D v2(1, 2);
@@ -791,7 +791,7 @@ void tst_QVector::compare2()
}
// Test the comparison operators for 3D vectors.
-void tst_QVector::compare3()
+void tst_QVectorND::compare3()
{
QVector3D v1(1, 2, 4);
QVector3D v2(1, 2, 4);
@@ -806,7 +806,7 @@ void tst_QVector::compare3()
}
// Test the comparison operators for 4D vectors.
-void tst_QVector::compare4()
+void tst_QVectorND::compare4()
{
QVector4D v1(1, 2, 4, 8);
QVector4D v2(1, 2, 4, 8);
@@ -823,7 +823,7 @@ void tst_QVector::compare4()
}
// Test vector addition for 2D vectors.
-void tst_QVector::add2_data()
+void tst_QVectorND::add2_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -852,7 +852,7 @@ void tst_QVector::add2_data()
<< (qreal)4.0f << (qreal)5.0f
<< (qreal)5.0f << (qreal)7.0f;
}
-void tst_QVector::add2()
+void tst_QVectorND::add2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -876,7 +876,7 @@ void tst_QVector::add2()
}
// Test vector addition for 3D vectors.
-void tst_QVector::add3_data()
+void tst_QVectorND::add3_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -913,7 +913,7 @@ void tst_QVector::add3_data()
<< (qreal)4.0f << (qreal)5.0f << (qreal)-6.0f
<< (qreal)5.0f << (qreal)7.0f << (qreal)-3.0f;
}
-void tst_QVector::add3()
+void tst_QVectorND::add3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -941,7 +941,7 @@ void tst_QVector::add3()
}
// Test vector addition for 4D vectors.
-void tst_QVector::add4_data()
+void tst_QVectorND::add4_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -986,7 +986,7 @@ void tst_QVector::add4_data()
<< (qreal)4.0f << (qreal)5.0f << (qreal)-6.0f << (qreal)9.0f
<< (qreal)5.0f << (qreal)7.0f << (qreal)-3.0f << (qreal)17.0f;
}
-void tst_QVector::add4()
+void tst_QVectorND::add4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1018,12 +1018,12 @@ void tst_QVector::add4()
}
// Test vector subtraction for 2D vectors.
-void tst_QVector::subtract2_data()
+void tst_QVectorND::subtract2_data()
{
// Use the same test data as the add test.
add2_data();
}
-void tst_QVector::subtract2()
+void tst_QVectorND::subtract2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1055,12 +1055,12 @@ void tst_QVector::subtract2()
}
// Test vector subtraction for 3D vectors.
-void tst_QVector::subtract3_data()
+void tst_QVectorND::subtract3_data()
{
// Use the same test data as the add test.
add3_data();
}
-void tst_QVector::subtract3()
+void tst_QVectorND::subtract3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1097,12 +1097,12 @@ void tst_QVector::subtract3()
}
// Test vector subtraction for 4D vectors.
-void tst_QVector::subtract4_data()
+void tst_QVectorND::subtract4_data()
{
// Use the same test data as the add test.
add4_data();
}
-void tst_QVector::subtract4()
+void tst_QVectorND::subtract4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1144,7 +1144,7 @@ void tst_QVector::subtract4()
}
// Test component-wise vector multiplication for 2D vectors.
-void tst_QVector::multiply2_data()
+void tst_QVectorND::multiply2_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1173,7 +1173,7 @@ void tst_QVector::multiply2_data()
<< (qreal)4.0f << (qreal)5.0f
<< (qreal)4.0f << (qreal)10.0f;
}
-void tst_QVector::multiply2()
+void tst_QVectorND::multiply2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1197,7 +1197,7 @@ void tst_QVector::multiply2()
}
// Test component-wise vector multiplication for 3D vectors.
-void tst_QVector::multiply3_data()
+void tst_QVectorND::multiply3_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1234,7 +1234,7 @@ void tst_QVector::multiply3_data()
<< (qreal)4.0f << (qreal)5.0f << (qreal)-6.0f
<< (qreal)4.0f << (qreal)10.0f << (qreal)-18.0f;
}
-void tst_QVector::multiply3()
+void tst_QVectorND::multiply3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1262,7 +1262,7 @@ void tst_QVector::multiply3()
}
// Test component-wise vector multiplication for 4D vectors.
-void tst_QVector::multiply4_data()
+void tst_QVectorND::multiply4_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1307,7 +1307,7 @@ void tst_QVector::multiply4_data()
<< (qreal)4.0f << (qreal)5.0f << (qreal)-6.0f << (qreal)9.0f
<< (qreal)4.0f << (qreal)10.0f << (qreal)-18.0f << (qreal)72.0f;
}
-void tst_QVector::multiply4()
+void tst_QVectorND::multiply4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1339,7 +1339,7 @@ void tst_QVector::multiply4()
}
// Test vector multiplication by a factor for 2D vectors.
-void tst_QVector::multiplyFactor2_data()
+void tst_QVectorND::multiplyFactor2_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1372,7 +1372,7 @@ void tst_QVector::multiplyFactor2_data()
<< (qreal)0.0f
<< (qreal)0.0f << (qreal)0.0f;
}
-void tst_QVector::multiplyFactor2()
+void tst_QVectorND::multiplyFactor2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1395,7 +1395,7 @@ void tst_QVector::multiplyFactor2()
}
// Test vector multiplication by a factor for 3D vectors.
-void tst_QVector::multiplyFactor3_data()
+void tst_QVectorND::multiplyFactor3_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1435,7 +1435,7 @@ void tst_QVector::multiplyFactor3_data()
<< (qreal)0.0f
<< (qreal)0.0f << (qreal)0.0f << (qreal)0.0f;
}
-void tst_QVector::multiplyFactor3()
+void tst_QVectorND::multiplyFactor3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1461,7 +1461,7 @@ void tst_QVector::multiplyFactor3()
}
// Test vector multiplication by a factor for 4D vectors.
-void tst_QVector::multiplyFactor4_data()
+void tst_QVectorND::multiplyFactor4_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1508,7 +1508,7 @@ void tst_QVector::multiplyFactor4_data()
<< (qreal)0.0f
<< (qreal)0.0f << (qreal)0.0f << (qreal)0.0f << (qreal)0.0f;
}
-void tst_QVector::multiplyFactor4()
+void tst_QVectorND::multiplyFactor4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1537,12 +1537,12 @@ void tst_QVector::multiplyFactor4()
}
// Test vector division by a factor for 2D vectors.
-void tst_QVector::divide2_data()
+void tst_QVectorND::divide2_data()
{
// Use the same test data as the multiply test.
multiplyFactor2_data();
}
-void tst_QVector::divide2()
+void tst_QVectorND::divide2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1567,12 +1567,12 @@ void tst_QVector::divide2()
}
// Test vector division by a factor for 3D vectors.
-void tst_QVector::divide3_data()
+void tst_QVectorND::divide3_data()
{
// Use the same test data as the multiply test.
multiplyFactor3_data();
}
-void tst_QVector::divide3()
+void tst_QVectorND::divide3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1600,12 +1600,12 @@ void tst_QVector::divide3()
}
// Test vector division by a factor for 4D vectors.
-void tst_QVector::divide4_data()
+void tst_QVectorND::divide4_data()
{
// Use the same test data as the multiply test.
multiplyFactor4_data();
}
-void tst_QVector::divide4()
+void tst_QVectorND::divide4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1636,12 +1636,12 @@ void tst_QVector::divide4()
}
// Test vector negation for 2D vectors.
-void tst_QVector::negate2_data()
+void tst_QVectorND::negate2_data()
{
// Use the same test data as the add test.
add2_data();
}
-void tst_QVector::negate2()
+void tst_QVectorND::negate2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1653,12 +1653,12 @@ void tst_QVector::negate2()
}
// Test vector negation for 3D vectors.
-void tst_QVector::negate3_data()
+void tst_QVectorND::negate3_data()
{
// Use the same test data as the add test.
add3_data();
}
-void tst_QVector::negate3()
+void tst_QVectorND::negate3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1671,12 +1671,12 @@ void tst_QVector::negate3()
}
// Test vector negation for 4D vectors.
-void tst_QVector::negate4_data()
+void tst_QVectorND::negate4_data()
{
// Use the same test data as the add test.
add4_data();
}
-void tst_QVector::negate4()
+void tst_QVectorND::negate4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1690,7 +1690,7 @@ void tst_QVector::negate4()
}
// Test the computation of vector cross-products.
-void tst_QVector::crossProduct_data()
+void tst_QVectorND::crossProduct_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1721,7 +1721,7 @@ void tst_QVector::crossProduct_data()
<< (qreal)-3.0f << (qreal)6.0f << (qreal)-3.0f
<< (qreal)32.0f;
}
-void tst_QVector::crossProduct()
+void tst_QVectorND::crossProduct()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1751,12 +1751,12 @@ void tst_QVector::crossProduct()
}
// Test the computation of normals.
-void tst_QVector::normal_data()
+void tst_QVectorND::normal_data()
{
// Use the same test data as the crossProduct test.
crossProduct_data();
}
-void tst_QVector::normal()
+void tst_QVectorND::normal()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1780,7 +1780,7 @@ void tst_QVector::normal()
}
// Test distance to plane calculations.
-void tst_QVector::distanceToPlane_data()
+void tst_QVectorND::distanceToPlane_data()
{
QTest::addColumn<qreal>("x1"); // Point on plane
QTest::addColumn<qreal>("y1");
@@ -1823,7 +1823,7 @@ void tst_QVector::distanceToPlane_data()
<< (qreal)0.0f << (qreal)2.0f << (qreal)0.0f
<< (qreal)-2.0f;
}
-void tst_QVector::distanceToPlane()
+void tst_QVectorND::distanceToPlane()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1853,7 +1853,7 @@ void tst_QVector::distanceToPlane()
}
// Test distance to line calculations.
-void tst_QVector::distanceToLine_data()
+void tst_QVectorND::distanceToLine_data()
{
QTest::addColumn<qreal>("x1"); // Point on line
QTest::addColumn<qreal>("y1");
@@ -1896,7 +1896,7 @@ void tst_QVector::distanceToLine_data()
<< (qreal)0.0f << (qreal)5.0f << (qreal)0.0f
<< (qreal)5.0f;
}
-void tst_QVector::distanceToLine()
+void tst_QVectorND::distanceToLine()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1917,7 +1917,7 @@ void tst_QVector::distanceToLine()
}
// Test the computation of dot products for 2D vectors.
-void tst_QVector::dotProduct2_data()
+void tst_QVectorND::dotProduct2_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -1940,7 +1940,7 @@ void tst_QVector::dotProduct2_data()
<< (qreal)4.0f << (qreal)5.0f
<< (qreal)14.0f;
}
-void tst_QVector::dotProduct2()
+void tst_QVectorND::dotProduct2()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1960,12 +1960,12 @@ void tst_QVector::dotProduct2()
}
// Test the computation of dot products for 3D vectors.
-void tst_QVector::dotProduct3_data()
+void tst_QVectorND::dotProduct3_data()
{
// Use the same test data as the crossProduct test.
crossProduct_data();
}
-void tst_QVector::dotProduct3()
+void tst_QVectorND::dotProduct3()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -1994,7 +1994,7 @@ void tst_QVector::dotProduct3()
}
// Test the computation of dot products for 4D vectors.
-void tst_QVector::dotProduct4_data()
+void tst_QVectorND::dotProduct4_data()
{
QTest::addColumn<qreal>("x1");
QTest::addColumn<qreal>("y1");
@@ -2021,7 +2021,7 @@ void tst_QVector::dotProduct4_data()
<< (qreal)4.0f << (qreal)5.0f << (qreal)6.0f << (qreal)7.0f
<< (qreal)60.0f;
}
-void tst_QVector::dotProduct4()
+void tst_QVectorND::dotProduct4()
{
QFETCH(qreal, x1);
QFETCH(qreal, y1);
@@ -2044,14 +2044,14 @@ void tst_QVector::dotProduct4()
QCOMPARE(QVector4D::dotProduct(v1, v2), d);
}
-class tst_QVectorProperties : public QObject
+class tst_QVectorNDProperties : public QObject
{
Q_OBJECT
Q_PROPERTY(QVector2D vector2D READ vector2D WRITE setVector2D)
Q_PROPERTY(QVector3D vector3D READ vector3D WRITE setVector3D)
Q_PROPERTY(QVector4D vector4D READ vector4D WRITE setVector4D)
public:
- tst_QVectorProperties(QObject *parent = 0) : QObject(parent) {}
+ tst_QVectorNDProperties(QObject *parent = 0) : QObject(parent) {}
QVector2D vector2D() const { return v2; }
void setVector2D(const QVector2D& value) { v2 = value; }
@@ -2069,9 +2069,9 @@ private:
};
// Test getting and setting vector properties via the metaobject system.
-void tst_QVector::properties()
+void tst_QVectorND::properties()
{
- tst_QVectorProperties obj;
+ tst_QVectorNDProperties obj;
obj.setVector2D(QVector2D(1.0f, 2.0f));
obj.setVector3D(QVector3D(3.0f, 4.0f, 5.0f));
@@ -2115,7 +2115,7 @@ void tst_QVector::properties()
QCOMPARE(v4.w(), (qreal)-9.0f);
}
-void tst_QVector::metaTypes()
+void tst_QVectorND::metaTypes()
{
QVERIFY(QMetaType::type("QVector2D") == QMetaType::QVector2D);
QVERIFY(QMetaType::type("QVector3D") == QMetaType::QVector3D);
@@ -2137,6 +2137,6 @@ void tst_QVector::metaTypes()
QVERIFY(qMetaTypeId<QVector4D>() == QMetaType::QVector4D);
}
-QTEST_APPLESS_MAIN(tst_QVector)
+QTEST_APPLESS_MAIN(tst_QVectorND)
#include "tst_qvectornd.moc"
diff --git a/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp b/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp
index 4a11404..f4f6181 100644
--- a/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp
+++ b/tests/auto/xmlpatternsdiagnosticsts/tst_xmlpatternsdiagnosticsts.cpp
@@ -52,25 +52,25 @@
\since 4.5
\brief Test QtXmlPatterns test suite driver in tests/auto/xmlpatternsxqts/lib/.
*/
-class tst_XmlPatternsXSLTS : public tst_SuiteTest
+class tst_XmlPatternsDiagnosticsTS : public tst_SuiteTest
{
Q_OBJECT
public:
- tst_XmlPatternsXSLTS();
+ tst_XmlPatternsDiagnosticsTS();
protected:
virtual void catalogPath(QString &write) const;
};
-tst_XmlPatternsXSLTS::tst_XmlPatternsXSLTS() : tst_SuiteTest(tst_SuiteTest::XQuerySuite, true)
+tst_XmlPatternsDiagnosticsTS::tst_XmlPatternsDiagnosticsTS() : tst_SuiteTest(tst_SuiteTest::XQuerySuite, true)
{
}
-void tst_XmlPatternsXSLTS::catalogPath(QString &write) const
+void tst_XmlPatternsDiagnosticsTS::catalogPath(QString &write) const
{
write = QLatin1String("TestSuite/DiagnosticsCatalog.xml");
}
-QTEST_MAIN(tst_XmlPatternsXSLTS)
+QTEST_MAIN(tst_XmlPatternsDiagnosticsTS)
#include "tst_xmlpatternsdiagnosticsts.moc"
#else