def test_create_include_macro(self): mock_pack = MagicMock() mock_pack.name = 'foo' mock_pack.catkin_deps = [] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_include_macro(mock_pack) self.assertEqual('# include\n# ${catkin_INCLUDE_DIRS}', statement) mock_pack.catkin_deps = ['roscpp', 'rospy'] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_include_macro(mock_pack) self.assertEqual('# include\n ${catkin_INCLUDE_DIRS}', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = [] statement = _create_include_macro(mock_pack) self.assertEqual( '# include\n ${catkin_INCLUDE_DIRS}\n ${Boost_INCLUDE_DIRS}', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = [] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_include_macro(mock_pack) self.assertEqual( '# include\n ${catkin_INCLUDE_DIRS}\n# TODO: Check names of system library include directories (log4cxx, BZip2)\n' ' ${log4cxx_INCLUDE_DIRS}\n ${BZip2_INCLUDE_DIRS}', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_include_macro(mock_pack) self.assertEqual( '# include\n ${catkin_INCLUDE_DIRS}\n ${Boost_INCLUDE_DIRS}\n# TODO: Check names of system library include directories (log4cxx, BZip2)\n' ' ${log4cxx_INCLUDE_DIRS}\n ${BZip2_INCLUDE_DIRS}', statement)
def test_create_include_macro(self): mock_pack = MagicMock() mock_pack.name = 'foo' mock_pack.catkin_deps = [] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_include_macro(mock_pack) self.assertEqual('# include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})', statement) mock_pack.catkin_deps = ['roscpp', 'rospy'] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_include_macro(mock_pack) self.assertEqual('include_directories(include\n ${catkin_INCLUDE_DIRS}\n)', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = [] statement = _create_include_macro(mock_pack) self.assertEqual('include_directories(include\n ${catkin_INCLUDE_DIRS}\n ${Boost_INCLUDE_DIRS}\n)', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = [] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_include_macro(mock_pack) self.assertEqual('# TODO: Check names of system library IDs (log4cxx, BZip2)\ninclude_directories(include\n ${catkin_INCLUDE_DIRS}\n ${log4cxx_INCLUDE_DIRS}\n ${BZip2_INCLUDE_DIRS}\n)', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_include_macro(mock_pack) self.assertEqual('# TODO: Check names of system library IDs (log4cxx, BZip2)\ninclude_directories(include\n ${catkin_INCLUDE_DIRS}\n ${Boost_INCLUDE_DIRS}\n ${log4cxx_INCLUDE_DIRS}\n ${BZip2_INCLUDE_DIRS}\n)', statement)