|
3 | 3 | #include <boost/test/included/unit_test.hpp> |
4 | 4 |
|
5 | 5 | #include <viam/sdk/common/pose.hpp> |
| 6 | +#include <viam/sdk/common/utils.hpp> |
6 | 7 | #include <viam/sdk/common/world_state.hpp> |
7 | 8 | #include <viam/sdk/services/motion.hpp> |
8 | 9 | #include <viam/sdk/spatialmath/geometry.hpp> |
@@ -164,18 +165,20 @@ BOOST_AUTO_TEST_SUITE(test_motion_client_server) |
164 | 165 |
|
165 | 166 | BOOST_AUTO_TEST_CASE(test_move_and_get_pose) { |
166 | 167 | auto mock = std::make_shared<MockMotion>("mock_motion"); |
167 | | - client_to_mock_pipeline<Motion>(mock, [](Motion& client) { |
| 168 | + client_to_mock_pipeline<Motion>(mock, [&](Motion& client) { |
168 | 169 | std::string destination_frame("destination"); |
169 | 170 | std::vector<WorldState::transform> transforms; |
170 | | - ProtoStruct extra = fake_map(); |
171 | | - pose_in_frame pose = client.get_pose(fake_component_name(), destination_frame, {}, extra); |
| 171 | + std::string debug_key = "debug-key"; |
| 172 | + pose_in_frame pose = client.get_pose( |
| 173 | + fake_component_name(), destination_frame, {}, with_debug_entry(fake_map(), debug_key)); |
| 174 | + BOOST_CHECK_EQUAL(mock->peek_debug_key, debug_key); |
172 | 175 | BOOST_CHECK_EQUAL(pose, init_fake_pose()); |
173 | 176 |
|
174 | 177 | auto ws = std::make_shared<WorldState>(mock_world_state()); |
175 | 178 | bool success = client.move(fake_pose(), fake_component_name(), ws, nullptr, fake_map()); |
176 | 179 | BOOST_TEST(success); |
177 | 180 |
|
178 | | - pose = client.get_pose(fake_component_name(), destination_frame, transforms, extra); |
| 181 | + pose = client.get_pose(fake_component_name(), destination_frame, transforms, fake_map()); |
179 | 182 | BOOST_CHECK_EQUAL(pose, fake_pose()); |
180 | 183 | }); |
181 | 184 | } |
|
0 commit comments