Added test project

This commit is contained in:
Leonetienne 2022-05-27 15:26:08 +02:00
parent b888585f75
commit 612157bcac
No known key found for this signature in database
GPG Key ID: C33879CD92E9708C
4 changed files with 18005 additions and 0 deletions

View File

@ -47,3 +47,32 @@ target_compile_options(${PROJECT_NAME} PRIVATE
-fdiagnostics-color=always
)
#########
# Tests #
#########
LIST(FILTER main_src EXCLUDE REGEX ".*/main.cpp")
FILE(GLOB test_src test/*.cpp)
add_executable(test
test/Catch2.h
${test_src}
${main_src}
${stringtools_src}
${generalutility_src}
${hazelnupp_src}
${gcrypt_src}
)
target_include_directories(test PRIVATE
include
${stringtools_include}
${generalutility_include}
${hazelnupp_include}
${gcrypt_include}
)
target_compile_options(test PRIVATE
-Werror
-fdiagnostics-color=always
)

17965
GCryptCLI/test/Catch2.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
#include "ModuleDataFormatter.h"
#include "Catch2.h"
using namespace Leonetienne::GCrypt;
// Empty test
TEST_CASE(__FILE__"", "[ModuleDataFormatter]") {
}

2
GCryptCLI/test/main.cpp Normal file
View File

@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "Catch2.h"