20#include <magic_enum.hpp>
21#include <magic_enum_iostream.hpp>
22#include <boost/test/unit_test.hpp>
27using magic_enum::iostream_operators::operator<<;
34 file.
name =
"test_file";
35 std::string data =
"Hello, World!";
49 file.
name =
"test_file";
50 std::string data =
"Hello, World!";
65 data.reserve( 13 * 100000 + 1 );
67 for(
int i = 0; i < 100000; ++i )
68 data +=
"Hello, World!";
84 data.reserve( 100000 );
86 for(
int i = 0; i < 100000; ++i )
87 data +=
static_cast<char>( i % 256 );
102 data.reserve( 100000 );
107 for(
int i = 0; i < 100000; ++i )
108 data +=
static_cast<char>(
rng() % 256 );
126 file.
name =
"test_file";
127 std::string data =
"Hello, World!";
@ CHECKSUM_ERROR
Checksum in file does not match data.
static RETURN_CODE DecompressAndDecode(EMBEDDED_FILE &aFile)
Takes data from the #compressedEncodedData buffer and Base64 decodes it.
static RETURN_CODE CompressAndEncode(EMBEDDED_FILE &aFile)
Take data from the #decompressedData buffer and compresses it using ZSTD into the #compressedEncodedD...
A streaming C++ equivalent for MurmurHash3_x64_128.
FORCE_INLINE void add(const std::string &input)
FORCE_INLINE HASH_128 digest()
FORCE_INLINE void reset(uint32_t aSeed=0)
static boost::mt19937 rng
std::vector< char > decompressedData
std::string ToString() const
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(CompressAndEncode_OK)
BOOST_AUTO_TEST_SUITE_END()