summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-02-01 12:03:59 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-02 05:42:07 +0100
commit3ddfa8d0eaa42864b055fafe046688a728c8d888 (patch)
treebce4baf0840207f964515708b6bffdd619c19551 /tests
parent5fa777de961efad954004b879fbaa6cd606c0966 (diff)
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 <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/testlib/selftests/findtestdata/findtestdata.cpp10
1 files 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.