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

Method test_legacy_native

tests/Library_test.cpp:135–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 QCOMPARE(native64, {});
134 }
135 void test_legacy_native()
136 {
137 RuntimeContext r = dummyContext();
138 Library test("test.package:testname:testversion");
139 test.m_nativeClassifiers["linux"] = "linux";
140 QCOMPARE(test.isNative(), true);
141 test.setRepositoryURL("file://foo/bar");
142 {
143 QStringList jar, native, native32, native64;
144 test.getApplicableFiles(r, jar, native, native32, native64, QString());
145 QCOMPARE(jar, {});
146 QCOMPARE(native, getStorage("test/package/testname/testversion/testname-testversion-linux.jar"));
147 QCOMPARE(native32, {});
148 QCOMPARE(native64, {});
149 QStringList failedFiles;
150 auto dls = test.getDownloads(r, cache.get(), failedFiles, QString());
151 QCOMPARE(dls.size(), 1);
152 QCOMPARE(failedFiles, {});
153 auto dl = dls[0];
154 QCOMPARE(dl->m_url, QUrl("file://foo/bar/test/package/testname/testversion/testname-testversion-linux.jar"));
155 }
156 }
157 void test_legacy_native_arch()
158 {
159 RuntimeContext r = dummyContext();

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected