* Remove deprecated executor::FutureReturnCode APIs. (#1327) While we are here, add in another test for the stream operator for future_return_code.cpp Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Revert removing deprecated API Signed-off-by: Stephen Brawner <brawner@gmail.com> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
This commit is contained in:
parent
5fd6e2340a
commit
e700d3becd
1 changed files with 9 additions and 1 deletions
|
@ -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");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rclcpp/future_return_code.hpp"
|
#include "rclcpp/future_return_code.hpp"
|
||||||
|
@ -32,3 +33,10 @@ TEST(TestFutureReturnCode, to_string) {
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
"Unknown enum value (100)", rclcpp::to_string(rclcpp::FutureReturnCode(100)));
|
"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());
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue