From 3ddfa8d0eaa42864b055fafe046688a728c8d888 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 1 Feb 2012 12:03:59 +1000 Subject: Fixed selftests unittest on windows - Needed to add toLower() for compare as c:\ and C:\ was causing a failure. Change-Id: Idd55774d118b7249e88362688166b4f9d9712c7c Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/testlib/selftests/findtestdata/findtestdata.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp index aadd0cab1e..c2e073d2ca 100644 --- a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp +++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp @@ -134,11 +134,17 @@ void FindTestData::paths() // __FILE__ may be absolute or relative path; test both. // absolute: +#if defined(Q_OS_WIN) + QCOMPARE(QTest::qFindTestData(TESTFILE, qPrintable(app_path + "/fakesrc/fakefile.cpp"), __LINE__).toLower(), testfile_path3.toLower()); +#else QCOMPARE(QTest::qFindTestData(TESTFILE, qPrintable(app_path + "/fakesrc/fakefile.cpp"), __LINE__), testfile_path3); - +#endif // relative: (pretend that we were compiled within fakebuild directory, pointing at files in ../fakesrc) +#if defined(Q_OS_WIN) + QCOMPARE(QTest::qFindTestData(TESTFILE, "../fakesrc/fakefile.cpp", __LINE__, qPrintable(app_path + "/fakebuild")).toLower(), testfile_path3.toLower()); +#else QCOMPARE(QTest::qFindTestData(TESTFILE, "../fakesrc/fakefile.cpp", __LINE__, qPrintable(app_path + "/fakebuild")), testfile_path3); - +#endif QVERIFY(QFile(testfile_path3).remove()); // Note, this is expected to generate a warning. -- cgit v1.2.3