Fixed testing (I think)

This commit is contained in:
Pascal Serrarens 2023-12-31 09:34:06 +01:00
parent 2c4f857e2d
commit 3de05ae621
3 changed files with 47 additions and 0 deletions

View File

@ -42,6 +42,15 @@ include_directories(
add_library(RoboidControl STATIC add_library(RoboidControl STATIC
"Roboid.cpp" "Roboid.cpp"
"Perception.cpp"
"Propulsion.cpp"
"Motor.cpp"
"DifferentialDrive.cpp"
"DistanceSensor.cpp"
"Placement.cpp"
"Sensor.cpp"
"Switch.cpp"
"Thing.cpp"
) )
enable_testing() enable_testing()

View File

@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}

View File

@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.13) # CMake version check
Project(test)
set(CMAKE_CXX_STANDARD 11) # Enable c++11 standard
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_compile_definitions(GTEST)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/heads/main.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
include_directories(include)
enable_testing()
add_executable(
VectorAlgebraTest
"test/Angle_test.cc"
"test/FloatSingle_test.cc"
"test/Vector2_test.cc"
"test/Vector3_test.cc"
"test/Quaternion_test.cc"
)
include(GoogleTest)