summaryrefslogtreecommitdiffstats
path: root/tests/TestUtil.h
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2013-12-15 12:18:42 +0100
committerJan Dalheimer <jan@dalheimer.de>2013-12-15 12:18:42 +0100
commit3e8bcc1cf6f3400fff9aa361ddc109bafe16d646 (patch)
treeafe65f236ffada97947daf0993002cbb3dc46950 /tests/TestUtil.h
parentf273334212274b1f1c7da376ef186314de8c4428 (diff)
downloadMultiMC-3e8bcc1cf6f3400fff9aa361ddc109bafe16d646.tar
MultiMC-3e8bcc1cf6f3400fff9aa361ddc109bafe16d646.tar.gz
MultiMC-3e8bcc1cf6f3400fff9aa361ddc109bafe16d646.tar.lz
MultiMC-3e8bcc1cf6f3400fff9aa361ddc109bafe16d646.tar.xz
MultiMC-3e8bcc1cf6f3400fff9aa361ddc109bafe16d646.zip
Unit tests for the DownloadUpdateTask class
Diffstat (limited to 'tests/TestUtil.h')
-rw-r--r--tests/TestUtil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/TestUtil.h b/tests/TestUtil.h
index 64ee1675..865fcf87 100644
--- a/tests/TestUtil.h
+++ b/tests/TestUtil.h
@@ -15,9 +15,14 @@ struct TestsInternal
f.open(QFile::ReadOnly);
return f.readAll();
}
+ static QString readFileUtf8(const QString &fileName)
+ {
+ return QString::fromUtf8(readFile(fileName));
+ }
};
#define MULTIMC_GET_TEST_FILE(file) TestsInternal::readFile(QFINDTESTDATA( file ))
+#define MULTIMC_GET_TEST_FILE_UTF8(file) TestsInternal::readFileUtf8(QFINDTESTDATA( file ))
#define QTEST_GUILESS_MAIN_MULTIMC(TestObject) \
int main(int argc, char *argv[]) \