diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-10-19 15:22:17 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-10-20 11:09:44 +0000 |
commit | b2d3a7dac9ca968b5800b6da1661e632a7ea9e90 (patch) | |
tree | 713dfd8335f364cd1c6556998b3aff2d051cb625 /sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp | |
parent | c6fb7198d726d61d90a702aa66c89765c3f19e79 (diff) |
shiboken/ApiExtractor tests: Use qrc files for test resources
This removes the need to copy around test files and the test
will also run when launched from a different directory.
Extend and fix the declare_test() CMake macro to also add resource
files, add .qrc files and modify the tests accordingly.
Task-number: PYSIDE-834
Change-Id: Id469e0b11837f7c6a7d71a20494ac019a32d8ed0
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp b/sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp index bf1057ee9..68da25373 100644 --- a/sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp +++ b/sources/shiboken2/ApiExtractor/tests/testcodeinjection.cpp @@ -40,13 +40,11 @@ void TestCodeInjections::testReadFileUtf8() int argc = 0; char *argv[] = {NULL}; QCoreApplication app(argc, argv); - QString filePath = QDir::currentPath(); QString xmlCode = QLatin1String("\ <typesystem package=\"Foo\">\n\ <value-type name='A'>\n\ - <conversion-rule file='") + filePath + QLatin1String("/utf8code.txt'/>\n\ - <inject-code class='target' file='") + filePath - + QLatin1String("/utf8code.txt'/>\n\ + <conversion-rule file=':/utf8code.txt'/>\n\ + <inject-code class='target' file=':/utf8code.txt'/>\n\ </value-type>\n\ <value-type name='A::B'/>\n\ </typesystem>\n"); |