api_tests.cpp
Go to the documentation of this file.
1 
6 #include <string>
7 #include <vector>
8 #include <iterator>
9 
10 #include <rtt/os/startstop.h>
11 
12 #include <ocl/DeploymentComponent.hpp>
13 #include <ocl/TaskBrowser.hpp>
14 #include <ocl/LoggingService.hpp>
15 #include <rtt/Logger.hpp>
18 
19 #include <boost/assign/std/vector.hpp>
20 using namespace boost::assign;
21 
22 #include <gtest/gtest.h>
23 
24 boost::shared_ptr<OCL::DeploymentComponent> deployer;
25 boost::shared_ptr<RTT::Scripting> scripting_service;
26 
27 TEST(BasicTest, Import)
28 {
29  // Import rtt_ros plugin
30  RTT::ComponentLoader::Instance()->import("rtt_ros", "" );
31 }
32 
33 TEST(BasicTest, ImportChaining)
34 {
35  // Import rtt_ros plugin
36  EXPECT_TRUE(scripting_service->eval("ros.import(\"rtt_ros_tests\")"));
37  EXPECT_TRUE(scripting_service->eval("ros.find(\"rtt_ros\")"));
38 }
39 
40 
41 int main(int argc, char** argv) {
42  testing::InitGoogleTest(&argc, argv);
43 
44  // Initialize Orocos
45  __os_init(argc, argv);
46 
47  deployer = boost::make_shared<OCL::DeploymentComponent>();
48  scripting_service = deployer->getProvider<RTT::Scripting>("scripting");
49 
50  RTT::Logger::log().setStdStream(std::cerr);
53 
54  return RUN_ALL_TESTS();
55 }
TEST(BasicTest, Import)
Definition: api_tests.cpp:27
int __os_init(int argc, char **argv)
static boost::shared_ptr< ComponentLoader > Instance()
boost::shared_ptr< OCL::DeploymentComponent > deployer
Definition: api_tests.cpp:24
void mayLogStdOut(bool tf)
int main(int argc, char **argv)
Definition: api_tests.cpp:41
boost::shared_ptr< RTT::Scripting > scripting_service
Definition: api_tests.cpp:25
static Logger & log()
void setStdStream(std::ostream &stdos)
void setLogLevel(LogLevel ll)


rtt_ros_tests
Author(s): Jonathan Bohren
autogenerated on Sat Jun 8 2019 18:05:13