-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Setup unit tests with boost::ut
- Loading branch information
Showing
9 changed files
with
44 additions
and
17,733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
find_package(Catch2 REQUIRED) | ||
# include_directories(BEFORE ${PROJECT_SOURCE_DIR}) | ||
include_directories(SYSTEM ${MYSQL_INCLUDE_DIR} ${LUA_INCLUDE_DIR} | ||
${Boost_INCLUDE_DIRS} ${PUGIXML_INCLUDE_DIR} | ||
${CRYPTOPP_INCLUDE_DIR}) | ||
find_package(ut CONFIG REQUIRED) | ||
|
||
project(canary_unittest) | ||
set(CMAKE_CXX_FLAGS "-pipe -O0 -g -std=c++11 -lstdc++ -lpthread -ldl") | ||
|
||
set(CMAKE_CXX_FLAGS "-pipe -O0 -g -Wno-everything -std=c++11 -lstdc++ -lpthread -ldl") | ||
add_executable(canary_ut main.cpp test1.cpp test2.cpp) | ||
|
||
add_executable(canary_unittest | ||
main.cpp | ||
account_test.cpp) | ||
|
||
target_compile_definitions(canary_unittest PUBLIC -DUNIT_TESTING -DDEBUG_LOG) | ||
|
||
target_link_libraries(canary_unittest Catch2::Catch2 canary_lib ${MYSQL_CLIENT_LIBS} ${LUA_LIBRARIES} | ||
${Boost_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} | ||
${PUGIXML_LIBRARIES} ${CRYPTOPP_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
include(CTest) | ||
include(Catch) | ||
catch_discover_tests(canary_unittest) | ||
target_compile_definitions(canary_ut PUBLIC -DDEBUG_LOG) | ||
target_link_libraries(canary_ut PRIVATE Boost::ut ${PROJECT_NAME}_lib) |
Oops, something went wrong.