Add tests

This commit is contained in:
Christophe Bedard 2019-07-02 14:35:24 +02:00
parent 237e137ce2
commit 0288722985
8 changed files with 154 additions and 4 deletions

View file

@ -87,8 +87,15 @@ else()
endif()
if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
ament_add_gtest(test_utils test/test_utils.cpp)
if(TARGET test_utils)
target_link_libraries(test_utils ${PROJECT_NAME} -rdynamic)
target_include_directories(test_utils PRIVATE test/)
endif()
endif()
ament_package()