Browse Source

test: add export test suite for RangesUnion

master
Dnomd343 5 months ago
parent
commit
bc2c123e12
  1. 13
      src/core_test/cases/ranges_union.cc

13
src/core_test/cases/ranges_union.cc

@ -1,11 +1,22 @@
#include <gtest/gtest.h>
#include <format>
#include "hash.h"
#include "helper/cases.h"
#include "ranges/ranges.h"
static_assert(std::is_base_of_v<std::array<Ranges, 16>, RangesUnion>);
// TODO: test CommonCode export
constexpr std::string_view ALL_CASES_MD5 = "3888e9fab8d3cbb50908b12b147cfb23";
TEST(RangesUnion, export) {
std::string buffer;
for (auto code : AllCases::instance().fetch().codes()) {
buffer += std::format("{:09X}\n", code.unwrap());
}
EXPECT_EQ(hash::md5(buffer), ALL_CASES_MD5);
}
TEST(RangesUnion, operator) {
Ranges r, r1, r2;

Loading…
Cancel
Save