Skip to content

Commit

Permalink
Reenable the test_intra_process* tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Dec 10, 2021
1 parent 09a8b8f commit 224b6d1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
#ifndef RCLCPP__EXPERIMENTAL__ROS_MESSAGE_INTRA_PROCESS_BUFFER_HPP_
#define RCLCPP__EXPERIMENTAL__ROS_MESSAGE_INTRA_PROCESS_BUFFER_HPP_

#include <functional>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <utility>

#include "rcl/error_handling.h"

#include "rclcpp/any_subscription_callback.hpp"
#include "rclcpp/context.hpp"
#include "rclcpp/experimental/subscription_intra_process_base.hpp"
#include "tracetools/tracetools.h"

Expand Down
36 changes: 18 additions & 18 deletions rclcpp/test/rclcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,24 @@ ament_add_gtest(
if(TARGET test_future_return_code)
target_link_libraries(test_future_return_code ${PROJECT_NAME})
endif()
# ament_add_gmock(test_intra_process_manager test_intra_process_manager.cpp)
# if(TARGET test_intra_process_manager)
# ament_target_dependencies(test_intra_process_manager
# "rcl"
# "rcl_interfaces"
# "rmw"
# "rosidl_runtime_cpp"
# "rosidl_typesupport_cpp"
# )
# target_link_libraries(test_intra_process_manager ${PROJECT_NAME})
# endif()
# ament_add_gmock(test_intra_process_manager_with_allocators test_intra_process_manager_with_allocators.cpp)
# if(TARGET test_intra_process_manager_with_allocators)
# ament_target_dependencies(test_intra_process_manager_with_allocators
# "test_msgs"
# )
# target_link_libraries(test_intra_process_manager_with_allocators ${PROJECT_NAME})
# endif()
ament_add_gmock(test_intra_process_manager test_intra_process_manager.cpp)
if(TARGET test_intra_process_manager)
ament_target_dependencies(test_intra_process_manager
"rcl"
"rcl_interfaces"
"rmw"
"rosidl_runtime_cpp"
"rosidl_typesupport_cpp"
)
target_link_libraries(test_intra_process_manager ${PROJECT_NAME})
endif()
ament_add_gmock(test_intra_process_manager_with_allocators test_intra_process_manager_with_allocators.cpp)
if(TARGET test_intra_process_manager_with_allocators)
ament_target_dependencies(test_intra_process_manager_with_allocators
"test_msgs"
)
target_link_libraries(test_intra_process_manager_with_allocators ${PROJECT_NAME})
endif()
ament_add_gtest(test_ring_buffer_implementation test_ring_buffer_implementation.cpp)
if(TARGET test_ring_buffer_implementation)
ament_target_dependencies(test_ring_buffer_implementation
Expand Down
12 changes: 12 additions & 0 deletions rclcpp/test/rclcpp/test_intra_process_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ class SubscriptionIntraProcessBuffer : public SubscriptionIntraProcessBase
buffer->add(std::move(msg));
}

void
provide_intra_process_data(std::shared_ptr<const MessageT> msg)
{
buffer->add(msg);
}

void
provide_intra_process_data(std::unique_ptr<MessageT> msg)
{
buffer->add(std::move(msg));
}

std::uintptr_t
pop()
{
Expand Down

0 comments on commit 224b6d1

Please sign in to comment.