Adding code

This commit is contained in:
2023-12-26 13:24:13 -06:00
parent d456d05c3d
commit d9bd070fd1
40 changed files with 1610 additions and 1656 deletions

19
tests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,19 @@
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.11.0
)
FetchContent_MakeAvailable(googletest)
add_library(GTest::GTest INTERFACE IMPORTED)
target_link_libraries(GTest::GTest INTERFACE gtest_main)
file(GLOB_RECURSE TEST_SRC "*.cpp")
add_executable(Test ${TEST_SRC})
target_link_libraries(Test PUBLIC J3ML)
#find_package(GTest REQUIRED)
target_link_libraries(Test PRIVATE GTest::GTest)
include_directories("include")
add_test(NAME "J3MLTestSuite" COMMAND J3MLTestSuite)

7
tests/tests.cpp Normal file
View File

@@ -0,0 +1,7 @@
#include <gtest/gtest.h>
GTEST_API_ int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}