ROSTEST
官方链接:http://wiki.ros.org/rostest
1.catkin_add_gtest和add_rostest_gtest区别
if(CATKIN_ENABLE_TESTING)
if(BUILD_UNIT_TESTS)
catkin_add_gtest(
primary_controller_unit_tests
test/unit_tests.cpp
)
if(TARGET primary_controller_unit_tests)
target_link_libraries(
primary_controller_unit_tests
${
catkin_LIBRARIES}
${
PROJECT_NAME}
)
endif()
endif(BUILD_UNIT_TESTS)
if(BUILD_INTEGRATION_TESTS)
add_rostest_gtest(
primary_controller_integration_tests
test/integration_tests.test
test/integration_tests.cpp
)
if(TARGET primary_controller_integration_tests)
target_link_libraries(
primary_controller_integration_tests
${
catkin_LIBRARIES}
${
PROJECT_NAME}
)
endif()
endif(BUILD_INTEGRATION_TESTS)
endif(CATKIN_ENABLE_TESTING)
2.使用add_rostest_gtest
if( CATKIN_ENABLE_TESTING )
add_rostest_gtest( test_calculator_ test/test_calculator.cpp src/calculator_client.cpp )
target_link_libraries( test_calculator_ ${
catkin_LIBRARIES} )
endif()
rostest calculator calculator.test
个人觉得这是对多个单元进行测试
3.使用catkin_add_gtest
if (CATKIN_ENABLE_TESTING)
catkin_add_gtest( test_calculator_2 test/test_calculator.cpp)
target_link_libraries( test_calculator_2 ${
catkin_LIBRARIES} )
endif()
rosrun calculator test_calculator_2
个人觉得这是对单个文件进行测试
撤销:Ctrl/Command + Z
重做:Ctrl/Command + Y
加粗:Ctrl/Command + B
斜体:Ctrl/Command + I
标题:Ctrl/Command + Shift + H
无序列表:Ctrl/Command + Shift + U
有序列表:Ctrl/Command + Shift + O
检查列表:Ctrl/Command + Shift + C
插入代码:Ctrl/Command + Shift + K
插入链接:Ctrl/Command + Shift + L
插入图片:Ctrl/Command + Shift + G
查找:Ctrl/Command + F
替换:Ctrl/Command + G
直接输入1次#,并按下space后,将生成1级标题。
输入2次#,并按下space后,将生成2级标题。
以此类推,我们支持6级标题。有助于使用TOC
语法后生成一个完美的目录。
如何改变文本的样式
强调文本 强调文本
加粗文本 加粗文本
标记文本
删除文本
引用文本
H2O is是液体。
210 运算结果是 1024.
插入链接与图片
链接: link.
图片:
带尺寸的图片:
居中的图片:
居中并且带尺寸的图片:
当然&#