def test_convert_cmakelists(self):
     lines = ['foo',
              'rosbuild_add_boost_directories(foo bar)',
              'baz',
              'rosbuild_add_gtest(bar)',
              'bum',
              'rosbuild_link_boost(fooz baaz)',
              'endtest']
     result_lines = convert_cmakelists('myprojecttest', lines)
     self.assertTrue('catkin_add_gtest(bar)' in result_lines, result_lines)
     self.assertFalse('rosbuild_add_gtest(bar)' in result_lines, result_lines)
     # don't care too much about header contents in this test
     expect_end = ['foo',
                   'baz',
                   'catkin_add_gtest(bar)',
                   'bum',
                   'find_package(Boost REQUIRED COMPONENTS baaz)',
                   'include_directories(${Boost_INCLUDE_DIRS})',
                   'target_link_libraries(fooz ${Boost_LIBRARIES})',
                   'endtest']
     self.assertEqual(expect_end, result_lines[-8:])
 def test_convert_cmakelists_handles_commented_lines_with_rosbuild_link_boost(self):
     line = '#rosbuild_link_boost(${PROJECT_NAME} thread)'
     result_lines = convert_cmakelists('project_name', [line])
     self.assertEqual('#link_boost(${PROJECT_NAME} thread)', result_lines[-1])