Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodall <william@osrfoundation.org>
  • Loading branch information
wjwwood committed Apr 3, 2024
1 parent 575573f commit f49e86f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Expand Up @@ -40,7 +40,6 @@ class TestWaitable : public rclcpp::Waitable
{
public:
void add_to_wait_set(rcl_wait_set_t &) override

{
if (!test_waitable_result) {
throw std::runtime_error("TestWaitable add_to_wait_set failed");
Expand Down
Expand Up @@ -52,7 +52,6 @@ class TestWaitable : public rclcpp::Waitable
: is_ready_(false), add_to_wait_set_(false) {}

void add_to_wait_set(rcl_wait_set_t &) override

{
if (!add_to_wait_set_) {
throw std::runtime_error("waitable unexpectedly failed to be added to wait set");
Expand Down
8 changes: 4 additions & 4 deletions rclcpp/test/rclcpp/waitables/test_intra_process_waitable.cpp
Expand Up @@ -22,8 +22,8 @@
class TestIntraProcessWaitable : public ::testing::Test
{
protected:
static void SetUpTestCase() { rclcpp::init(0, nullptr); }
static void TearDownTestCase() { rclcpp::shutdown(); }
static void SetUpTestCase() {rclcpp::init(0, nullptr);}
static void TearDownTestCase() {rclcpp::shutdown();}
};

TEST_F(TestIntraProcessWaitable, test_that_waitable_stays_ready_after_second_wait) {
Expand All @@ -36,8 +36,8 @@ TEST_F(TestIntraProcessWaitable, test_that_waitable_stays_ready_after_second_wai
auto pub = node->create_publisher<Empty>("test_topic", 10);

auto make_sub_intra_process_waitable_ready = [pub]() {
pub->publish(Empty());
};
pub->publish(Empty());
};

rclcpp::test::waitables::do_test_that_waitable_stays_ready_after_second_wait(
sub->get_intra_process_waitable(),
Expand Down
8 changes: 4 additions & 4 deletions rclcpp/test/rclcpp/waitables/waitable_test_helpers.hpp
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef RCLCPP__TEST__RCLCPP__WAITABLES__WAITABLE_TEST_HELPERS_HPP_
#define RCLCPP__TEST__RCLCPP__WAITABLES__WAITABLE_TEST_HELPERS_HPP_
#ifndef RCLCPP__WAITABLES__WAITABLE_TEST_HELPERS_HPP_
#define RCLCPP__WAITABLES__WAITABLE_TEST_HELPERS_HPP_

#include <gtest/gtest.h>

Expand Down Expand Up @@ -104,7 +104,7 @@ do_test_that_waitable_stays_ready_after_second_wait(
waitable->execute(waitable->take_data());
auto wait_result = wait_set.wait(std::chrono::seconds(0));
EXPECT_EQ(wait_result.kind(), rclcpp::WaitResultKind::Timeout)
<< "wait set did not time out after the waitable should have no longer been ready";
<< "wait set did not time out after the waitable should have no longer been ready";
EXPECT_FALSE(waitable->is_ready(wait_set.get_rcl_wait_set()))
<< "waitable was unexpectedly ready after a take_data and execute";
}
Expand All @@ -114,4 +114,4 @@ do_test_that_waitable_stays_ready_after_second_wait(
} // namespace test
} // namespace rclcpp

#endif // RCLCPP__TEST__RCLCPP__WAITABLES__WAITABLE_TEST_HELPERS_HPP_
#endif // RCLCPP__WAITABLES__WAITABLE_TEST_HELPERS_HPP_

0 comments on commit f49e86f

Please sign in to comment.