def test_create_targetlib_args(self): mock_pack = MagicMock() mock_pack.name = 'foo' mock_pack.catkin_deps = [] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp', 'rospy'] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = [] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n# ${Boost_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = [] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_targetlib_args(mock_pack) self.assertEqual( '# ${catkin_LIBRARIES}\n# ${log4cxx_LIBRARIES}\n# ${BZip2_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_targetlib_args(mock_pack) self.assertEqual( '# ${catkin_LIBRARIES}\n# ${Boost_LIBRARIES}\n# ${log4cxx_LIBRARIES}\n# ${BZip2_LIBRARIES}\n', statement)
def test_create_targetlib_args(self): mock_pack = MagicMock() mock_pack.name = 'foo' mock_pack.catkin_deps = [] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp', 'rospy'] mock_pack.boost_comps = [] mock_pack.system_deps = [] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = [] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n# ${Boost_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = [] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n# ${log4cxx_LIBRARIES}\n# ${BZip2_LIBRARIES}\n', statement) mock_pack.catkin_deps = ['roscpp'] mock_pack.boost_comps = ['thread', 'filesystem'] mock_pack.system_deps = ['log4cxx', 'BZip2'] statement = _create_targetlib_args(mock_pack) self.assertEqual('# ${catkin_LIBRARIES}\n# ${Boost_LIBRARIES}\n# ${log4cxx_LIBRARIES}\n# ${BZip2_LIBRARIES}\n', statement)