Attention: Answers.ros.org is deprecated as of August the 11th, 2023. Please visit robotics.stackexchange.com to ask a new question. This site will remain online in read-only mode during the transition and into the foreseeable future. Selected questions and answers have been migrated, and redirects have been put in place to direct users to the corresponding questions on Robotics Stack Exchange. Additional details are available here.
As of this PR (which was merged in late 2017, should be in catkin versions 0.7.9 and later), the easiest way to add a GMock test is to use catkin_add_gmock instead of catkin_add_gtest, as seen in the docs.