Add basic unit tests for refactored functions in rcl_yaml_param_parser (coverage part 1/3) (#771)
* Add basic unit tests for refactored functions Signed-off-by: Stephen Brawner <brawner@gmail.com> * PR Fixup Signed-off-by: Stephen Brawner <brawner@gmail.com> * Fix memory errors Signed-off-by: Stephen Brawner <brawner@gmail.com> * headers moved Signed-off-by: Stephen Brawner <brawner@gmail.com> * Addressing feedback Signed-off-by: Stephen Brawner <brawner@gmail.com> * Switch to decltype Signed-off-by: Stephen Brawner <brawner@gmail.com>
This commit is contained in:
parent
a34c4816c9
commit
79e2e044d3
5 changed files with 827 additions and 0 deletions
|
@ -63,6 +63,30 @@ if(BUILD_TESTING)
|
|||
performance_test_fixture::performance_test_fixture INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
# Gtests
|
||||
ament_add_gtest(test_namespace
|
||||
test/test_namespace.cpp
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
if(TARGET test_namespace)
|
||||
ament_target_dependencies(test_namespace
|
||||
"rcutils"
|
||||
"osrf_testing_tools_cpp"
|
||||
)
|
||||
target_link_libraries(test_namespace ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
ament_add_gtest(test_node_params
|
||||
test/test_node_params.cpp
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
if(TARGET test_node_params)
|
||||
ament_target_dependencies(test_node_params
|
||||
"rcutils"
|
||||
"osrf_testing_tools_cpp"
|
||||
)
|
||||
target_link_libraries(test_node_params ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
ament_add_gtest(test_parse_yaml
|
||||
test/test_parse_yaml.cpp
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
|
@ -73,6 +97,18 @@ if(BUILD_TESTING)
|
|||
PRIVATE ${osrf_testing_tools_cpp_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
ament_add_gtest(test_parse
|
||||
test/test_parse.cpp
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
if(TARGET test_parse)
|
||||
ament_target_dependencies(test_parse
|
||||
"rcutils"
|
||||
"osrf_testing_tools_cpp"
|
||||
)
|
||||
target_link_libraries(test_parse ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
ament_add_gtest(test_parser
|
||||
test/test_parser.cpp
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
|
@ -94,6 +130,17 @@ if(BUILD_TESTING)
|
|||
"rcutils"
|
||||
)
|
||||
endif()
|
||||
ament_add_gtest(test_yaml_variant
|
||||
test/test_yaml_variant.cpp
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
if(TARGET test_yaml_variant)
|
||||
ament_target_dependencies(test_yaml_variant
|
||||
"rcutils"
|
||||
"osrf_testing_tools_cpp"
|
||||
)
|
||||
target_link_libraries(test_yaml_variant ${PROJECT_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ament_export_dependencies(ament_cmake libyaml_vendor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue