|
KiCad PCB EDA Suite
|
#include <magic_enum.hpp>#include <magic_enum_iostream.hpp>#include <boost/test/unit_test.hpp>#include <mmh3_hash.h>#include <embedded_files.h>#include <wx/wfstream.h>#include <random>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (CompressAndEncode_OK) | |
| BOOST_AUTO_TEST_CASE (DecompressAndDecode_OK) | |
| BOOST_AUTO_TEST_CASE (DecompressAndDecode_ChecksumError) | |
| BOOST_AUTO_TEST_CASE (ComputeFileHash_MatchesEmbeddedHash) | |
| BOOST_AUTO_TEST_CASE (ComputeFileHash_DifferentContent) | |
| BOOST_AUTO_TEST_CASE (ComputeFileHash_NonExistentFile) | |
| BOOST_AUTO_TEST_CASE | ( | CompressAndEncode_OK | ) |
Definition at line 33 of file test_embedded_file_compress.cpp.
References MMH3_HASH::add(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), EMBEDDED_FILES::CompressAndEncode(), EMBEDDED_FILES::EMBEDDED_FILE::data_hash, EMBEDDED_FILES::EMBEDDED_FILE::decompressedData, EMBEDDED_FILES::EMBEDDED_FILE::name, EMBEDDED_FILES::OK, result, and EMBEDDED_FILES::Seed().
| BOOST_AUTO_TEST_CASE | ( | ComputeFileHash_DifferentContent | ) |
Definition at line 172 of file test_embedded_file_compress.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), EMBEDDED_FILES::ComputeFileHash(), and EMBEDDED_FILES::OK.
| BOOST_AUTO_TEST_CASE | ( | ComputeFileHash_MatchesEmbeddedHash | ) |
Definition at line 143 of file test_embedded_file_compress.cpp.
References EMBEDDED_FILES::AddFile(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), EMBEDDED_FILES::ComputeFileHash(), EMBEDDED_FILES::EMBEDDED_FILE::data_hash, EMBEDDED_FILES::OK, and result.
| BOOST_AUTO_TEST_CASE | ( | ComputeFileHash_NonExistentFile | ) |
Definition at line 208 of file test_embedded_file_compress.cpp.
References BOOST_CHECK_EQUAL(), EMBEDDED_FILES::ComputeFileHash(), EMBEDDED_FILES::FILE_NOT_FOUND, and result.
| BOOST_AUTO_TEST_CASE | ( | DecompressAndDecode_ChecksumError | ) |
Definition at line 125 of file test_embedded_file_compress.cpp.
References BOOST_CHECK_EQUAL(), EMBEDDED_FILES::CHECKSUM_ERROR, EMBEDDED_FILES::CompressAndEncode(), EMBEDDED_FILES::EMBEDDED_FILE::data_hash, EMBEDDED_FILES::DecompressAndDecode(), EMBEDDED_FILES::EMBEDDED_FILE::decompressedData, EMBEDDED_FILES::EMBEDDED_FILE::name, EMBEDDED_FILES::OK, and result.
| BOOST_AUTO_TEST_CASE | ( | DecompressAndDecode_OK | ) |
Definition at line 48 of file test_embedded_file_compress.cpp.
References MMH3_HASH::add(), BOOST_CHECK_EQUAL(), EMBEDDED_FILES::CompressAndEncode(), EMBEDDED_FILES::EMBEDDED_FILE::data_hash, EMBEDDED_FILES::DecompressAndDecode(), EMBEDDED_FILES::EMBEDDED_FILE::decompressedData, MMH3_HASH::digest(), EMBEDDED_FILES::EMBEDDED_FILE::name, EMBEDDED_FILES::OK, MMH3_HASH::reset(), result, rng, EMBEDDED_FILES::Seed(), and HASH_128::ToString().