MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / test_onenine_native_arch

Method test_onenine_native_arch

tests/Library_test.cpp:307–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305 QCOMPARE(dls[0]->m_url, QUrl("https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar"));
306 }
307 void test_onenine_native_arch()
308 {
309 RuntimeContext r = dummyContext("windows");
310 auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-native-arch.json"));
311 QStringList jar, native, native32, native64;
312 test->getApplicableFiles(r, jar, native, native32, native64, QString());
313 QCOMPARE(jar, {});
314 QCOMPARE(native, {});
315 QCOMPARE(native32, getStorage("tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-32.jar"));
316 QCOMPARE(native64, getStorage("tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-64.jar"));
317 QStringList failedFiles;
318 auto dls = test->getDownloads(r, cache.get(), failedFiles, QString());
319 QCOMPARE(dls.size(), 2);
320 QCOMPARE(failedFiles, {});
321 QCOMPARE(dls[0]->m_url, QUrl("https://libraries.minecraft.net/tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-32.jar"));
322 QCOMPARE(dls[1]->m_url, QUrl("https://libraries.minecraft.net/tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-64.jar"));
323 }
324private:
325 std::unique_ptr<HttpMetaCache> cache;
326 QString dataDir;

Callers

nothing calls this directly

Calls 6

QStringClass · 0.85
QUrlClass · 0.85
getApplicableFilesMethod · 0.80
getDownloadsMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected