diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-09-02 09:28:28 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-09-02 09:28:28 +0000 |
| commit | 37da09eeb4ac168217a0d05ae40adfd8c0f35e64 (patch) | |
| tree | b0893dc04fa317463c6f48a2a3744ce3623f1776 /tests/tests.cpp | |
| parent | 8324556cfa55a0cc15ac19165dc48a1492aa43d0 (diff) | |
| download | qxmpp-37da09eeb4ac168217a0d05ae40adfd8c0f35e64.tar.gz | |
load test files from resources so the tests can be run from any path
Diffstat (limited to 'tests/tests.cpp')
| -rw-r--r-- | tests/tests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |
