Browse Source

update: upgrade md5sum library

master
Dnomd343 1 year ago
parent
commit
2a1bd22d18
  1. 6
      .gitmodules
  2. 8
      src/core_test/CMakeLists.txt
  3. 8
      src/core_test/cases/all_cases.cc
  4. 1
      third_party/md5
  5. 1
      third_party/md5sum

6
.gitmodules

@ -1,12 +1,12 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
[submodule "third_party/md5"]
path = third_party/md5
url = https://github.com/ulwanski/md5.git
[submodule "third_party/tiny_thread_pool"]
path = third_party/tiny_thread_pool
url = https://github.com/dnomd343/tiny_thread_pool.git
[submodule "third_party/abseil-cpp"]
path = third_party/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
[submodule "third_party/md5sum"]
path = third_party/md5sum
url = https://github.com/dnomd343/md5sum.git

8
src/core_test/CMakeLists.txt

@ -6,15 +6,15 @@ include_directories(${KLOTSKI_ROOT_PATH}/third_party/googletest/googletest/inclu
add_subdirectory(${KLOTSKI_ROOT_PATH}/third_party/googletest googletest EXCLUDE_FROM_ALL)
#unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
include_directories(${KLOTSKI_ROOT_PATH}/third_party/md5)
add_library(md5 STATIC ${KLOTSKI_ROOT_PATH}/third_party/md5/md5.cpp)
include_directories(${KLOTSKI_ROOT_PATH}/third_party/md5sum)
#add_library(md5 STATIC ${KLOTSKI_ROOT_PATH}/third_party/md5/md5.cpp)
add_subdirectory(${KLOTSKI_ROOT_PATH}/third_party/md5sum md5sum EXCLUDE_FROM_ALL)
set(KLOTSKI_TEST_DEPS klotski-core gtest gtest_main md5)
set(KLOTSKI_TEST_DEPS klotski-core gtest gtest_main md5sum)
include_directories(${KLOTSKI_ROOT_PATH}/src/core/all_cases)
include_directories(${KLOTSKI_ROOT_PATH}/src/core/utils)
add_executable(test_klotski_cases cases/all_cases.cc)
target_link_libraries(test_klotski_cases PRIVATE ${KLOTSKI_TEST_DEPS})
add_test(NAME klotski_cases COMMAND test_klotski_cases)

8
src/core_test/cases/all_cases.cc

@ -3,7 +3,9 @@
#include <vector>
#include "gtest/gtest.h"
#include "all_cases.h"
#include "md5.h"
#include "md5sum.h"
using md5::md5sum;
using klotski::cases::AllCases;
using klotski::cases::BasicRanges;
@ -46,7 +48,7 @@ TEST(Cases, basic_ranges_data) {
asprintf(&tmp, "%08X\n", range);
basic_ranges_str += tmp;
}
EXPECT_EQ(md5(basic_ranges_str), BASIC_RANGES_MD5);
EXPECT_EQ(md5sum(basic_ranges_str), BASIC_RANGES_MD5);
}
TEST(Cases, all_cases_build) {
@ -85,5 +87,5 @@ TEST(Cases, all_cases_data) {
all_cases_str += tmp;
}
}
EXPECT_EQ(md5(all_cases_str), ALL_CASES_MD5);
EXPECT_EQ(md5sum(all_cases_str), ALL_CASES_MD5);
}

1
third_party/md5

@ -1 +0,0 @@
Subproject commit 2857560d6466c7b1a89da93a075ebadf6991783e

1
third_party/md5sum

@ -0,0 +1 @@
Subproject commit d58aa1e4eacff0e6086fe13ed435643b412d4c33
Loading…
Cancel
Save