MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / setOsCode

Method setOsCode

lib/QuaZip/qztest/testquazip.cpp:219–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219void TestQuaZip::setOsCode()
220{
221 QFETCH(QString, zipName);
222 QFETCH(uint, osCode);
223 QuaZip testZip(zipName);
224 testZip.setOsCode(osCode);
225 testZip.open(QuaZip::mdCreate);
226 QCOMPARE(testZip.getOsCode(), osCode);
227 QuaZipFile testZipFile(&testZip);
228 testZipFile.open(QIODevice::WriteOnly, QuaZipNewInfo("test.txt"));
229 testZipFile.close();
230 testZip.close();
231 QuaZip checkZip(zipName);
232 checkZip.open(QuaZip::mdUnzip);
233 checkZip.goToFirstFile();
234 QuaZipFileInfo64 fi;
235 QVERIFY(checkZip.getCurrentFileInfo(&fi));
236 QCOMPARE(static_cast<uint>(fi.versionCreated) >> 8, osCode);
237 checkZip.close();
238 QDir().remove(zipName);
239}
240
241void TestQuaZip::setDataDescriptorWritingEnabled()
242{

Callers

nothing calls this directly

Calls 6

getOsCodeMethod · 0.80
goToFirstFileMethod · 0.80
getCurrentFileInfoMethod · 0.80
openMethod · 0.45
closeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected