| 230 | } |
| 231 | } |
| 232 | void test_onenine() |
| 233 | { |
| 234 | RuntimeContext r = dummyContext("osx"); |
| 235 | auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-simple.json")); |
| 236 | { |
| 237 | QStringList jar, native, native32, native64; |
| 238 | test->getApplicableFiles(r, jar, native, native32, native64, QString()); |
| 239 | QCOMPARE(jar, getStorage("com/paulscode/codecwav/20101023/codecwav-20101023.jar")); |
| 240 | QCOMPARE(native, {}); |
| 241 | QCOMPARE(native32, {}); |
| 242 | QCOMPARE(native64, {}); |
| 243 | } |
| 244 | r.system = "linux"; |
| 245 | { |
| 246 | QStringList failedFiles; |
| 247 | auto dls = test->getDownloads(r, cache.get(), failedFiles, QString()); |
| 248 | QCOMPARE(dls.size(), 1); |
| 249 | QCOMPARE(failedFiles, {}); |
| 250 | QCOMPARE(dls[0]->m_url, QUrl("https://libraries.minecraft.net/com/paulscode/codecwav/20101023/codecwav-20101023.jar")); |
| 251 | } |
| 252 | r.system = "osx"; |
| 253 | test->setHint("local"); |
| 254 | { |
| 255 | QStringList jar, native, native32, native64; |
| 256 | test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library")); |
| 257 | QCOMPARE(jar, {QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath()}); |
| 258 | QCOMPARE(native, {}); |
| 259 | QCOMPARE(native32, {}); |
| 260 | QCOMPARE(native64, {}); |
| 261 | } |
| 262 | r.system = "linux"; |
| 263 | { |
| 264 | QStringList failedFiles; |
| 265 | auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library")); |
| 266 | QCOMPARE(dls.size(), 0); |
| 267 | QCOMPARE(failedFiles, {}); |
| 268 | } |
| 269 | } |
| 270 | void test_onenine_local_override() |
| 271 | { |
| 272 | RuntimeContext r = dummyContext("osx"); |
nothing calls this directly
no test coverage detected