Setting up testing

This commit is contained in:
2023-09-10 16:29:34 -05:00
parent ce424df021
commit eb4995ee41
3 changed files with 36 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
find_package(unity REQUIRED)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
add_executable(testing
./testing.cpp
../src/main.cpp
../src/algorithm.cpp
)
set_target_properties(testing PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(testing unity)
+23
View File
@@ -0,0 +1,23 @@
#include <unity/unity.h>
#include <unity/unity_internals.h>
#include <vector>
#include "algorithm.hpp"
// Function is defined here for testing
void setUp(void)
{
;
}
void tearDown(void)
{
;
}
int main(void)
{
UNITY_BEGIN();
return UNITY_END();
}