summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2012-02-20 11:39:31 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-20 08:06:04 +0100
commit7fbe7fd7b5a31cdadc8fb06a1d226e4a2b0a3f9f (patch)
tree3819f88ca8563cd59b148da5cddd492df8941688 /tests/auto
parenteb52d78e90ad8870a055f586d9d14d7068acd95b (diff)
Make QLocale autotest pass for shadow builds.
For shadow builds where "make install" had not been run, the tst_QLocale::emptyCtor test function would fail to find its helper application because QFINDTESTDATA was not searching for it in the build directory due to the test not instantiating QCoreApplication. This commit fixes the test by instantiating a QCoreApplication using the QTEST_MAIN macro, which also allows some special case code for Windows CE to be removed. Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index e23448c056..db7f503f57 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -59,7 +59,6 @@
#endif
#ifdef Q_OS_WINCE
-#include <qcoreapplication.h>
#include <windows.h> // needed for GetUserDefaultLCID
#define _control87 _controlfp
extern "C" DWORD GetThreadLocale(void) {
@@ -141,11 +140,6 @@ tst_QLocale::tst_QLocale()
void tst_QLocale::ctor()
{
-#ifdef Q_OS_WINCE
- int argc = 1;
- char argv[20] = "tst_qlocale.exe";
- QCoreApplication app(argc, (char**)&argv);
-#endif
QLocale default_locale = QLocale::system();
QLocale::Language default_lang = default_locale.language();
QLocale::Country default_country = default_locale.country();
@@ -1988,5 +1982,5 @@ void tst_QLocale::listPatterns()
QCOMPARE(zh_CN.createSeparatedList(sl5), QString::fromUtf8("aaa" "\xe3\x80\x81" "bbb" "\xe3\x80\x81" "ccc" "\xe5\x92\x8c" "ddd"));
}
-QTEST_APPLESS_MAIN(tst_QLocale)
+QTEST_MAIN(tst_QLocale)
#include "tst_qlocale.moc"