From 37da09eeb4ac168217a0d05ae40adfd8c0f35e64 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 2 Sep 2010 09:28:28 +0000 Subject: load test files from resources so the tests can be run from any path --- tests/tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/tests.cpp') diff --git a/tests/tests.cpp b/tests/tests.cpp index 69f0cd2a..4ad3fc59 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -109,7 +109,8 @@ void TestUtils::testJid() static void testMimeType(const QString &fileName, const QString fileType) { - QFile file(fileName); + // load file from resources + QFile file(":/" + fileName); QCOMPARE(file.open(QIODevice::ReadOnly), true); QCOMPARE(getImageType(file.readAll()), fileType); file.close(); -- cgit v1.2.3