aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-01-31 10:21:01 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-01-31 14:44:21 -0300
commit984cd4d8fd361e89ac5b8a514b8088bb53b925f6 (patch)
treefb7816777a5475f34b90aabb229eed4fc0cc6d57
parent5f6d08e17f214d7d3a41a1cbdfb2d975e02a33cd (diff)
Fixed the project file test to work with win32 paths.
Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--tests/test_generator/dummygentest.cpp6
-rw-r--r--tests/test_generator/dummygentestconfig.h.in6
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/test_generator/dummygentest.cpp b/tests/test_generator/dummygentest.cpp
index 3261a3cac..83f3c9263 100644
--- a/tests/test_generator/dummygentest.cpp
+++ b/tests/test_generator/dummygentest.cpp
@@ -115,14 +115,16 @@ void DummyGenTest::testProjectFileArgumentsReading()
QCOMPARE(logContents[3], QString("generator-set = dummy"));
QVERIFY(logContents[4].startsWith("header-file = "));
QVERIFY(logContents[4].endsWith("test_global.h"));
- QCOMPARE(logContents[5], QString("include-paths = /include/path/location1:/include/path/location2"));
+ QCOMPARE(logContents[5],
+ QDir::toNativeSeparators(QString("include-paths = /include/path/location1%1/include/path/location2").arg(PATH_SPLITTER)));
QCOMPARE(logContents[6], QString("no-suppress-warnings"));
QCOMPARE(logContents[7], QString("output-directory = /tmp/output"));
QVERIFY(logContents[8].startsWith("project-file = "));
QVERIFY(logContents[8].endsWith("dummygentest-project.txt"));
QVERIFY(logContents[9].startsWith("typesystem-file = "));
QVERIFY(logContents[9].endsWith("test_typesystem.xml"));
- QCOMPARE(logContents[10], QString("typesystem-paths = /typesystem/path/location1:/typesystem/path/location2"));
+ QCOMPARE(logContents[10],
+ QDir::toNativeSeparators(QString("typesystem-paths = /typesystem/path/location1%1/typesystem/path/location2").arg(PATH_SPLITTER)));
}
QTEST_APPLESS_MAIN(DummyGenTest)
diff --git a/tests/test_generator/dummygentestconfig.h.in b/tests/test_generator/dummygentestconfig.h.in
index e472804dc..9da17dcd3 100644
--- a/tests/test_generator/dummygentestconfig.h.in
+++ b/tests/test_generator/dummygentestconfig.h.in
@@ -5,5 +5,11 @@
#define DUMMYGENERATOR_BINARY "@DUMMYGENERATOR_EXECUTABLE@"
#define DUMMYGENERATOR_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@"
+#ifdef _WINDOWS
+ #define PATH_SPLITTER ";"
+#else
+ #define PATH_SPLITTER ":"
+#endif
+
#endif // DUMMYGENTESTCONFIG_H