Skip to content

Commit 75c7d53

Browse files
author
Cédric Tabin
committed
indentation fix in tests
1 parent 3e5632b commit 75c7d53

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

tests/tests.cpp

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -599,49 +599,49 @@ void test20() {
599599
assert(!entry2.isNull());
600600

601601
{
602-
// Extract somedata with chunk of 2 bytes, which is not divisible by the file size (17 Bytes)
603-
std::ofstream ofUnzippedFile("somedata.txt");
604-
assert(static_cast<bool>(ofUnzippedFile));
605-
assert(entry.readContent(ofUnzippedFile, ZipArchive::CURRENT, 2) == 0);
606-
ofUnzippedFile.close();
607-
608-
std::ifstream ifUnzippedFile("somedata.txt");
609-
assert(static_cast<bool>(ifUnzippedFile));
610-
std::string strSomedataText((std::istreambuf_iterator<char>(ifUnzippedFile)), std::istreambuf_iterator<char>());
611-
assert(strSomedataText.compare(txtFile) == 0);
612-
ifUnzippedFile.close();
613-
assert(remove("somedata.txt") == 0);
602+
// Extract somedata with chunk of 2 bytes, which is not divisible by the file size (17 Bytes)
603+
std::ofstream ofUnzippedFile("somedata.txt");
604+
assert(static_cast<bool>(ofUnzippedFile));
605+
assert(entry.readContent(ofUnzippedFile, ZipArchive::CURRENT, 2) == 0);
606+
ofUnzippedFile.close();
607+
608+
std::ifstream ifUnzippedFile("somedata.txt");
609+
assert(static_cast<bool>(ifUnzippedFile));
610+
std::string strSomedataText((std::istreambuf_iterator<char>(ifUnzippedFile)), std::istreambuf_iterator<char>());
611+
assert(strSomedataText.compare(txtFile) == 0);
612+
ifUnzippedFile.close();
613+
assert(remove("somedata.txt") == 0);
614614
}
615615

616616
{
617-
// Extract somedata with chunk of 0 bytes (will be defaulted to 512KB).
618-
std::ofstream ofUnzippedFile("somedata.txt");
619-
assert(static_cast<bool>(ofUnzippedFile));
620-
assert(entry.readContent(ofUnzippedFile, ZipArchive::CURRENT, 0) == 0);
621-
ofUnzippedFile.close();
622-
623-
std::ifstream ifUnzippedFile("somedata.txt");
624-
assert(static_cast<bool>(ifUnzippedFile));
625-
std::string strSomedataText((std::istreambuf_iterator<char>(ifUnzippedFile)), std::istreambuf_iterator<char>());
626-
assert(strSomedataText.compare(txtFile) == 0);
627-
ifUnzippedFile.close();
628-
assert(remove("somedata.txt") == 0);
617+
// Extract somedata with chunk of 0 bytes (will be defaulted to 512KB).
618+
std::ofstream ofUnzippedFile("somedata.txt");
619+
assert(static_cast<bool>(ofUnzippedFile));
620+
assert(entry.readContent(ofUnzippedFile, ZipArchive::CURRENT, 0) == 0);
621+
ofUnzippedFile.close();
622+
623+
std::ifstream ifUnzippedFile("somedata.txt");
624+
assert(static_cast<bool>(ifUnzippedFile));
625+
std::string strSomedataText((std::istreambuf_iterator<char>(ifUnzippedFile)), std::istreambuf_iterator<char>());
626+
assert(strSomedataText.compare(txtFile) == 0);
627+
ifUnzippedFile.close();
628+
assert(remove("somedata.txt") == 0);
629629
}
630630

631631
{
632-
// Extract somedata2 with a chunk which is divisible by the size of the file (18 Bytes) to check that the modulo branch
633-
// is not accessed !
634-
std::ofstream ofUnzippedFile("somedata2.txt");
635-
assert(static_cast<bool>(ofUnzippedFile));
636-
assert(entry2.readContent(ofUnzippedFile, ZipArchive::CURRENT, 2) == 0);
637-
ofUnzippedFile.close();
638-
639-
std::ifstream ifUnzippedFile("somedata2.txt");
640-
assert(static_cast<bool>(ifUnzippedFile));
641-
std::string strSomedataText((std::istreambuf_iterator<char>(ifUnzippedFile)), std::istreambuf_iterator<char>());
642-
assert(strSomedataText.compare(txtFile2) == 0);
643-
ifUnzippedFile.close();
644-
assert(remove("somedata2.txt") == 0);
632+
// Extract somedata2 with a chunk which is divisible by the size of the file (18 Bytes) to check that the modulo branch
633+
// is not accessed !
634+
std::ofstream ofUnzippedFile("somedata2.txt");
635+
assert(static_cast<bool>(ofUnzippedFile));
636+
assert(entry2.readContent(ofUnzippedFile, ZipArchive::CURRENT, 2) == 0);
637+
ofUnzippedFile.close();
638+
639+
std::ifstream ifUnzippedFile("somedata2.txt");
640+
assert(static_cast<bool>(ifUnzippedFile));
641+
std::string strSomedataText((std::istreambuf_iterator<char>(ifUnzippedFile)), std::istreambuf_iterator<char>());
642+
assert(strSomedataText.compare(txtFile2) == 0);
643+
ifUnzippedFile.close();
644+
assert(remove("somedata2.txt") == 0);
645645
}
646646

647647
z2.close();

0 commit comments

Comments
 (0)