Browse Source

test: md5sum of basic ranges data

legacy
Dnomd343 2 years ago
parent
commit
2bc04352f5
  1. 14
      test/all_cases.cc

14
test/all_cases.cc

@ -4,6 +4,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
const uint32_t BASIC_RANGES_SIZE = 7311921; const uint32_t BASIC_RANGES_SIZE = 7311921;
const char BASIC_RANGES_MD5[] = "6f385dc171e201089ff96bb010b47212";
TEST(AllCases, basic_ranges_size) { TEST(AllCases, basic_ranges_size) {
auto &basic_ranges = BasicRanges::fetch(); auto &basic_ranges = BasicRanges::fetch();
@ -11,9 +12,12 @@ TEST(AllCases, basic_ranges_size) {
} }
TEST(AllCases, basic_ranges_data) { TEST(AllCases, basic_ranges_data) {
auto &basic_ranges = BasicRanges::fetch(); auto *basic_ranges_data = new char[BASIC_RANGES_SIZE * 9];
auto *current = basic_ranges_data;
std::cout << md5("dnomd343", 8) << std::endl; for (const auto &range : BasicRanges::fetch()) {
sprintf(current, "%08X\n", range);
// EXPECT_EQ(basic_ranges.size(), BASIC_RANGES_SIZE); current += 9;
}
auto basic_ranges_md5 = md5(basic_ranges_data, BASIC_RANGES_SIZE * 9);
EXPECT_STREQ(basic_ranges_md5.c_str(), BASIC_RANGES_MD5);
} }

Loading…
Cancel
Save