File: test_client_single_threaded.cpp

package info (click to toggle)
ros-dynamic-reconfigure 1.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: python: 1,752; cpp: 657; xml: 35; ansic: 18; makefile: 11; sh: 2
file content (24 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <ros/ros.h>
#include <gtest/gtest.h>
#include <dynamic_reconfigure/client.h>
#include <dynamic_reconfigure/TestConfig.h>

using namespace dynamic_reconfigure_test;
using namespace dynamic_reconfigure;


TestConfig CONFIG;

TEST(dynamic_reconfigure_client_single_thread, singleThreadedSetGet) {
  Client<TestConfig> client("/ref_server");
  CONFIG = TestConfig::__getDefault__();
  EXPECT_TRUE(client.setConfiguration(CONFIG));
  EXPECT_TRUE(client.getCurrentConfiguration(CONFIG));
}

int main(int argc, char** argv)
{
  ros::init(argc, argv, "dynamic_reconfigure_single_threaded_client_test");
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}