我对如何将参数从main传递到类固定装置感到有些困惑。说我有:
#include "robot.h"
class Checksweep : public testing::Test{
public:
Checksweep(){}
virtual void SetUp() {
Robot1 = new Robot(&nh);
}
virtual void TearDown() { delete Robot1; }
Robot *Robot1;
};
TEST_F(Checksweep, MyTestCaseName)
{
}
int main(int argc, char **argv){
testing::InitGoogleTest(&argc, argv);
ros::init(argc, argv, "robot_test_node");
ros::NodeHandle nh;
return RUN_ALL_TESTS();
}
反正我有nh
类中的main()
从setup()
发送到Checksweep
吗?