diff --git a/rclcpp/include/rclcpp/future_return_code.hpp b/rclcpp/include/rclcpp/future_return_code.hpp index 9161fa832d..0da67d7f7b 100644 --- a/rclcpp/include/rclcpp/future_return_code.hpp +++ b/rclcpp/include/rclcpp/future_return_code.hpp @@ -42,20 +42,6 @@ RCLCPP_PUBLIC std::string to_string(const FutureReturnCode & future_return_code); -namespace executor -{ - -using FutureReturnCode [[deprecated("use rclcpp::FutureReturnCode instead")]] = FutureReturnCode; - -[[deprecated("use rclcpp::to_string(const rclcpp::FutureReturnCode &) instead")]] -inline -std::string -to_string(const rclcpp::FutureReturnCode & future_return_code) -{ - return rclcpp::to_string(future_return_code); -} - -} // namespace executor } // namespace rclcpp #endif // RCLCPP__FUTURE_RETURN_CODE_HPP_ diff --git a/rclcpp/test/rclcpp/test_future_return_code.cpp b/rclcpp/test/rclcpp/test_future_return_code.cpp index f4647b6e29..0ad2dcd44b 100644 --- a/rclcpp/test/rclcpp/test_future_return_code.cpp +++ b/rclcpp/test/rclcpp/test_future_return_code.cpp @@ -1,4 +1,4 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. +// Copyright 2020 Open Source Robotics Foundation, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,6 +14,7 @@ #include +#include #include #include "rclcpp/future_return_code.hpp" @@ -32,3 +33,10 @@ TEST(TestFutureReturnCode, to_string) { EXPECT_EQ( "Unknown enum value (100)", rclcpp::to_string(rclcpp::FutureReturnCode(100))); } + +TEST(FutureReturnCode, ostream) { + std::ostringstream ostream; + + ostream << rclcpp::FutureReturnCode::SUCCESS; + ASSERT_EQ("SUCCESS (0)", ostream.str()); +}