summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib
diff options
context:
space:
mode:
authorninerider <qt-info@nokia.com>2010-02-27 11:09:28 (GMT)
committerninerider <qt-info@nokia.com>2010-02-27 11:09:28 (GMT)
commit30abadd0d0a190889dab6d1c154053a25e060042 (patch)
tree76ce61a1563efbe9e11e217fc22fcedb642d4674 /tests/benchmarks/corelib
parent1422686ebbba55c64d6e6a7bbe33db72af317711 (diff)
downloadQt-30abadd0d0a190889dab6d1c154053a25e060042.zip
Qt-30abadd0d0a190889dab6d1c154053a25e060042.tar.gz
Qt-30abadd0d0a190889dab6d1c154053a25e060042.tar.bz2
Test modifications for the Windows Mobile platform.
Test were changed to run in reasonable time on Windows Mobile. Also some test were skipped for instance those using OpenGL. OpenGL support for Windows Mobile is a forthcoming feature.
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp17
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp4
4 files changed, 19 insertions, 6 deletions
diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
index 1238804..4fe4723 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
+++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
@@ -165,7 +165,7 @@ private slots:
WIN32_FIND_DATA fd;
HANDLE hSearch = FindFirstFileW(appendedPath, &fd);
- QVERIFY(hSearch == INVALID_HANDLE_VALUE);
+ QVERIFY(hSearch != INVALID_HANDLE_VALUE);
QBENCHMARK {
do {
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index 103b77c..2dc0e86 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -175,7 +175,10 @@ void tst_qfile::cleanupTestCase()
void tst_qfile::readBigFile_QFile() { readBigFile(); }
void tst_qfile::readBigFile_QFSFileEngine() { readBigFile(); }
-void tst_qfile::readBigFile_posix() { readBigFile(); }
+void tst_qfile::readBigFile_posix()
+{
+ readBigFile();
+}
void tst_qfile::readBigFile_Win32() { readBigFile(); }
void tst_qfile::readBigFile_QFile_data()
@@ -476,8 +479,14 @@ void tst_qfile::open()
void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); }
void tst_qfile::readSmallFiles_QFSFileEngine() { readSmallFiles(); }
-void tst_qfile::readSmallFiles_posix() { readSmallFiles(); }
-void tst_qfile::readSmallFiles_Win32() { readSmallFiles(); }
+void tst_qfile::readSmallFiles_posix()
+{
+ readSmallFiles();
+}
+void tst_qfile::readSmallFiles_Win32()
+{
+ readSmallFiles();
+}
void tst_qfile::readSmallFiles_QFile_data()
{
@@ -534,7 +543,7 @@ void tst_qfile::createSmallFiles()
dir.cd("tst");
tmpDirName = dir.absolutePath();
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE)
for (int i = 0; i < 100; ++i)
#else
for (int i = 0; i < 1000; ++i)
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index a6e405c..edf0eff 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -133,7 +133,7 @@ struct Large { // A "large" item type
};
// Symbian devices typically have limited memory
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE)
# define LARGE_MAX_SIZE 2000
#else
# define LARGE_MAX_SIZE 20000
diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index 3fac598..81ecd11 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
@@ -147,6 +147,7 @@ void tst_QStringList::split_data() const
void tst_QStringList::split_std() const
{
+#ifndef QT_NO_STL
QFETCH(QString, input);
const char split_char = ':';
std::string stdinput = input.toStdString();
@@ -159,10 +160,12 @@ void tst_QStringList::split_std() const
token.push_back(each))
;
}
+#endif
}
void tst_QStringList::split_stdw() const
{
+#ifndef QT_NO_STL
QFETCH(QString, input);
const wchar_t split_char = ':';
std::wstring stdinput = input.toStdWString();
@@ -175,6 +178,7 @@ void tst_QStringList::split_stdw() const
token.push_back(each))
;
}
+#endif
}
void tst_QStringList::split_ba() const