20 #include "google/protobuf/text_format.h" 21 #include "gtest/gtest.h" 31 using ::testing::Pointee;
32 using ::testing::Truly;
34 const std::string kMessage = R
"( 36 landmark_id: "landmark_1" 47 landmark_id: "landmark_2" 59 using GetLandmarkPosesHandlerTest =
60 testing::HandlerTest<GetLandmarkPosesSignature, GetLandmarkPosesHandler>;
62 TEST_F(GetLandmarkPosesHandlerTest, NoLocalSlamUploader) {
63 std::map<std::string, Rigid3d> landmark_poses{
64 {
"landmark_1",
Rigid3d(Eigen::Vector3d(1., 2., 3.),
65 Eigen::Quaterniond(1., 0., 0., 0.))},
66 {
"landmark_2",
Rigid3d(Eigen::Vector3d(3., 2., 1.),
67 Eigen::Quaterniond(0., 1., 0., 0.))}};
69 .WillOnce(::testing::Return(landmark_poses));
70 test_server_->SendWrite(google::protobuf::Empty());
72 proto::GetLandmarkPosesResponse expected_response;
73 EXPECT_TRUE(google::protobuf::TextFormat::ParseFromString(
74 kMessage, &expected_response));
76 test_server_->response(),
std::unique_ptr< MockPoseGraph > mock_pose_graph_
ProtoPredicateType BuildProtoPredicateEquals(const google::protobuf::Message *proto)