Browse Source

test: basic ranges size

master
Dnomd343 2 years ago
parent
commit
f5a54fb979
  1. 9
      CMakeLists.txt
  2. 6
      test/CMakeLists.txt
  3. 10
      test/all_cases.cc

9
CMakeLists.txt

@ -13,3 +13,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
add_compile_options(-fPIC)
add_subdirectory(src)
################################################
enable_testing()
add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
include_directories(third_party/googletest/googletest/include)
add_subdirectory(test)
################################################

6
test/CMakeLists.txt

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.0)
include_directories(../src/klotski/all_cases)
add_executable(test_all_cases all_cases.cc)
target_link_libraries(test_all_cases all_cases gtest gtest_main)
add_test(NAME all_cases COMMAND test_all_cases)

10
test/all_cases.cc

@ -0,0 +1,10 @@
#include <cstdint>
#include "all_cases.h"
#include "gtest/gtest.h"
const uint32_t BASIC_RANGES_SIZE = 7311921;
TEST(AllCases, basic_ranges_size) {
auto &basic_ranges = BasicRanges::fetch();
EXPECT_EQ(basic_ranges.size(), BASIC_RANGES_SIZE);
}
Loading…
Cancel
Save