runTests.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018 - for information on the respective copyright owner
2 // see the NOTICE file and/or the repository https://github.com/boschresearch/fmi_adapter.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #include <cassert>
17 #include <iostream>
18 #include <gtest/gtest.h>
19 #include <ros/ros.h>
20 
21 
22 int main(int argc, char** argv) {
23  ros::init(argc, argv, "fmi_adapter_test", ros::init_options::AnonymousName);
24 
25  if (!ros::master::check()) {
26  std::cout << "ROS master is NOT running. Skipping all unit tests!" << std::endl;
27  ::testing::GTEST_FLAG(filter) = "-*";
28  testing::InitGoogleTest(&argc, argv);
29  return RUN_ALL_TESTS();
30  }
31 
32  ros::start();
33 
34  testing::InitGoogleTest(&argc, argv);
35  int testResult = RUN_ALL_TESTS();
36 
37  return testResult;
38 }
ROSCPP_DECL bool check()
ROSCPP_DECL void start()
int main(int argc, char **argv)
Definition: runTests.cpp:22
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)


fmi_adapter
Author(s): Ralph Lange
autogenerated on Wed Nov 23 2022 03:42:28