1// Bring in my package's API, which is what I'm testing
2#include "foo/foo.h"
3// Bring in gtest
4#include <gtest/gtest.h>
5
6// Declare a test
7TEST(TestSuite, testCase1)
8{
9<test things here, calling EXPECT_* and/or ASSERT_* macros as needed>
10}
11
12// Declare another test
13TEST(TestSuite, testCase2)
14{
15<test things here, calling EXPECT_* and/or ASSERT_* macros as needed>
16}
17
18// Run all the tests that were declared with TEST()
19int main(int argc, char **argv){
20 testing::InitGoogleTest(&argc, argv);
21 ros::init(argc, argv, "tester");
22 ros::NodeHandle nh;
23 return RUN_ALL_TESTS();
24}