add password hash test (#4528)

* clangify tests

* add password hash test

* properly use googletest semantics
This commit is contained in:
ebbit1q 2022-01-16 22:32:11 +01:00 committed by GitHub
parent f6634de18d
commit 1e70989f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 125 additions and 81 deletions

View file

@ -1,11 +1,13 @@
enable_testing()
add_test(NAME dummy_test COMMAND dummy_test)
add_test(NAME expression_test COMMAND expression_test)
add_test(NAME password_hash_test COMMAND password_hash_test)
# Find GTest
add_executable(dummy_test dummy_test.cpp)
add_executable(expression_test expression_test.cpp)
add_executable(password_hash_test password_hash_test.cpp)
find_package(GTest)
@ -35,6 +37,7 @@ if(NOT GTEST_FOUND)
SET(GTEST_BOTH_LIBRARIES gtest)
add_dependencies(dummy_test gtest)
add_dependencies(expression_test gtest)
add_dependencies(password_hash_test gtest)
endif()
find_package(Qt5 COMPONENTS Widgets REQUIRED)
@ -44,6 +47,7 @@ set(TEST_QT_MODULES Qt5::Widgets)
include_directories(${GTEST_INCLUDE_DIRS})
target_link_libraries(dummy_test Threads::Threads ${GTEST_BOTH_LIBRARIES})
target_link_libraries(expression_test cockatrice_common Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
target_link_libraries(password_hash_test cockatrice_common Threads::Threads ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
add_subdirectory(carddatabase)
add_subdirectory(loading_from_clipboard)