From 175871f9468b083a59554394ef2fa72ef6098070 Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Thu, 13 Jan 2011 15:00:12 -0300 Subject: Un-hardcode test resources path Instead of hardcoding (through the __FILE__ macro) use the current application directory to find the resources. The previous scheme didn't allow running the tests when the source code isn't available. List of resources: - a.xml -> testmodifydocumentation - utf8code.txt -> testcodeinjection Reviewer: Luciano Wolf Reviewer: Hugo Lima --- tests/testmodifydocumentation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/testmodifydocumentation.cpp') diff --git a/tests/testmodifydocumentation.cpp b/tests/testmodifydocumentation.cpp index 33a478650..46151ee88 100644 --- a/tests/testmodifydocumentation.cpp +++ b/tests/testmodifydocumentation.cpp @@ -50,7 +50,7 @@ void TestModifyDocumentation::testModifyDocumentation() QCOMPARE(docMods[0].code().trimmed(), QString("Some changed contents here")); QCOMPARE(docMods[0].signature(), QString("")); QtDocParser docParser; - docParser.setDocumentationDataDirectory(QFileInfo(__FILE__).absoluteDir().absolutePath()); + docParser.setDocumentationDataDirectory(QCoreApplication::applicationDirPath()); docParser.fillDocumentation(classA); QVERIFY(!classA->documentation().value().trimmed().isEmpty()); -- cgit v1.2.3