From 7fbe7fd7b5a31cdadc8fb06a1d226e4a2b0a3f9f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 20 Feb 2012 11:39:31 +1000 Subject: 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 --- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests') 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 #include // 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" -- cgit v1.2.3