Hi,
I have a line.cpp with a main function and some other functions I want to test.
Then I have my utest.cpp with my test cases and another main function to call them.
A solution would be to just comment the main function and then test, but that is not the solution I am looking for.
I understand that I can not have multiple main files in my project, but how can I test my functions? Because in the robot_pose_ekf package, there are also two main files and it works.
The CMake relevant part looks like this:
rosbuild_add_executable(line src/line.cpp)
rosbuild_add_gtest(test/utest test/utest.cpp)
Originally posted by madmax on ROS Answers with karma: 496 on 2013-06-01
Post score: 0