Skip to content

Commit

Permalink
add string test
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 12, 2024
1 parent fb21318 commit f1c0f2a
Show file tree
Hide file tree
Showing 3 changed files with 6,775 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_compile_options(
/DDEBUG
/utf-8
)
add_link_options(/FORCE:MULTIPLE)

include(ProcessorCount)
ProcessorCount(PROC_N)
Expand All @@ -30,18 +31,17 @@ set(
include_directories(../include)
add_library(doctest STATIC test.cpp)

file(
GLOB TEST_FILES
LIST_DIRECTORIES false
${CMAKE_CURRENT_SOURCE_DIR}/*test.cpp
)

add_executable(${PROJECT_NAME} ${TEST_FILES})
add_test(
NAME ${PROJECT_NAME}
COMMAND $<TARGET_FILE:${PROJECT_NAME}>
WORKING_DIRECTORY ..
)
function(AddTest TEST_NAME)
add_executable(${TEST_NAME} ${ARGN})
target_link_libraries(${TEST_NAME} doctest)
add_test(
NAME ${TEST_NAME}
COMMAND $<TARGET_FILE:${TEST_NAME}>
WORKING_DIRECTORY ..
)
endfunction()

AddTest(string_test string_test.cpp)

set(
CMAKE_CTEST_ARGUMENTS
Expand Down
Loading

0 comments on commit f1c0f2a

Please sign in to comment.