tst_qresourceengine: Fix test for configurations with builtin_testdata

If builtin_testdata is present additional data ends in inside of
resources so that tests can access this data when needed. The addiitonal
data has to be taken into account in the resource engine's test.

Change-Id: I10de6b9612ca49b314d77cfadd5b2360a5d90d53
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Oliver Wolff 2018-05-03 12:18:24 +02:00
parent 4dada8068a
commit a27f888dec
2 changed files with 13 additions and 1 deletions

View File

@ -21,3 +21,5 @@ GENERATED_TESTDATA = $${runtime_resource.target}
android:!android-embedded {
RESOURCES += android_testdata.qrc
}
builtin_testdata: DEFINES += BUILTIN_TESTDATA

View File

@ -125,9 +125,19 @@ void tst_QResourceEngine::checkStructure_data()
rootContents.insert(1, QLatin1String("android_testdata"));
#endif
#if defined(BUILTIN_TESTDATA)
rootContents.insert(8, QLatin1String("testqrc"));
#endif
QTest::newRow("root dir") << QString(":/")
<< QString()
<< (QStringList() << "search_file.txt")
<< (QStringList()
#if defined(BUILTIN_TESTDATA)
<< "parentdir.txt"
<< "runtime_resource.rcc"
#endif
<< "search_file.txt")
<< rootContents
<< QLocale::c()
<< qlonglong(0);