19 #include <gtest/gtest.h> 22 #include <packml_msgs/Transition.h> 23 #include <packml_msgs/State.h> 27 int main(
int argc,
char **argv)
30 testing::InitGoogleTest(&argc, argv);
31 return RUN_ALL_TESTS();
35 TEST(Packml_ROS, sync_packml_cmd)
39 EXPECT_EQ(static_cast<int>(CmdEnum::ABORT), Transition::Request::ABORT);
40 EXPECT_EQ(static_cast<int>(CmdEnum::CLEAR), Transition::Request::CLEAR);
41 EXPECT_EQ(static_cast<int>(CmdEnum::ESTOP), Transition::Request::ESTOP);
42 EXPECT_EQ(static_cast<int>(CmdEnum::HOLD), Transition::Request::HOLD);
43 EXPECT_EQ(static_cast<int>(CmdEnum::RESET), Transition::Request::RESET);
44 EXPECT_EQ(static_cast<int>(CmdEnum::START), Transition::Request::START);
45 EXPECT_EQ(static_cast<int>(CmdEnum::STOP), Transition::Request::STOP);
46 EXPECT_EQ(static_cast<int>(CmdEnum::SUSPEND), Transition::Request::SUSPEND);
47 EXPECT_EQ(static_cast<int>(CmdEnum::UNDEFINED), Transition::Request::UNDEFINED);
48 EXPECT_EQ(static_cast<int>(CmdEnum::UNHOLD), Transition::Request::UNHOLD);
49 EXPECT_EQ(static_cast<int>(CmdEnum::UNSUSPEND), Transition::Request::UNSUSPEND);
53 TEST(Packml_ROS, sync_packml_state)
57 EXPECT_EQ(static_cast<int>(StatesEnum::ABORTED), State::ABORTED);
58 EXPECT_EQ(static_cast<int>(StatesEnum::ABORTING), State::ABORTING);
59 EXPECT_EQ(static_cast<int>(StatesEnum::CLEARING), State::CLEARING);
60 EXPECT_EQ(static_cast<int>(StatesEnum::COMPLETE), State::COMPLETE);
61 EXPECT_EQ(static_cast<int>(StatesEnum::COMPLETING), State::COMPLETING);
62 EXPECT_EQ(static_cast<int>(StatesEnum::EXECUTE), State::EXECUTE);
63 EXPECT_EQ(static_cast<int>(StatesEnum::HELD), State::HELD);
64 EXPECT_EQ(static_cast<int>(StatesEnum::HOLDING), State::HOLDING);
65 EXPECT_EQ(static_cast<int>(StatesEnum::IDLE), State::IDLE);
TEST(Packml_ROS, sync_packml_cmd)
int main(int argc, char **argv)