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

Method setAutoClose

lib/QuaZip/qztest/testquazip.cpp:378–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378void TestQuaZip::setAutoClose()
379{
380 {
381 QBuffer buf;
382 QuaZip zip(&buf);
383 QVERIFY(zip.isAutoClose());
384 QVERIFY(zip.open(QuaZip::mdCreate));
385 QVERIFY(buf.isOpen());
386 zip.close();
387 QVERIFY(!buf.isOpen());
388 QVERIFY(zip.open(QuaZip::mdCreate));
389 }
390 {
391 QBuffer buf;
392 QuaZip zip(&buf);
393 QVERIFY(zip.isAutoClose());
394 zip.setAutoClose(false);
395 QVERIFY(!zip.isAutoClose());
396 QVERIFY(zip.open(QuaZip::mdCreate));
397 QVERIFY(buf.isOpen());
398 zip.close();
399 QVERIFY(buf.isOpen());
400 QVERIFY(zip.open(QuaZip::mdCreate));
401 }
402}
403
404#ifdef QUAZIP_TEST_QSAVEFILE
405void TestQuaZip::saveFileBug()

Callers 1

testSequentialMethod · 0.45

Calls 4

isAutoCloseMethod · 0.80
openMethod · 0.45
isOpenMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected