Skip to content

Commit

Permalink
Add initial test for BitArchiveEditor and BitFileCompressor
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Oct 25, 2023
1 parent e4cffec commit 3db27c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/src/test_bitarchiveeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@

#include <catch2/catch.hpp>

#include "utils/shared_lib.hpp"

#include <bit7z/bitformat.hpp>
#include <bit7z/bit7zlibrary.hpp>
#include <bit7z/bitarchiveeditor.hpp>

using namespace bit7z;

TEST_CASE( "BitArchiveEditor: TODO", "[bitarchiveeditor]" ) {
const Bit7zLibrary lib{ test::sevenzip_lib_path() };

REQUIRE_THROWS( BitArchiveEditor{ lib, BIT7Z_STRING( "non_existent.7z" ), BitFormat::SevenZip } );
}
8 changes: 7 additions & 1 deletion tests/src/test_bitfilecompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@
*/
#include <catch2/catch.hpp>

#include <bit7z/bitfilecompressor.hpp>
#include "utils/shared_lib.hpp"

#include <bit7z/bitformat.hpp>
#include <bit7z/bit7zlibrary.hpp>
#include <bit7z/bitfilecompressor.hpp>

using namespace bit7z;
using bit7z::Bit7zLibrary;
using bit7z::BitFileCompressor;
using bit7z::BitInOutFormat;

TEST_CASE( "BitFileCompressor: TODO", "[bitfilecompressor]" ) {
const Bit7zLibrary lib{ test::sevenzip_lib_path() };

const BitFileCompressor fileCompressor{ lib, BitFormat::SevenZip};
REQUIRE( fileCompressor.compressionFormat() == BitFormat::SevenZip ); // Just a placeholder test.
}

0 comments on commit 3db27c5

Please sign in to comment.