mock_trajectory_builder.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_TRAJECTORY_BUILDER_H_
18 #define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_TRAJECTORY_BUILDER_H_
19 
21 #include "glog/logging.h"
22 #include "gmock/gmock.h"
23 #include "gtest/gtest.h"
24 
25 namespace cartographer {
26 namespace mapping {
27 namespace testing {
28 
30  public:
31  MockTrajectoryBuilder() = default;
32  ~MockTrajectoryBuilder() override = default;
33 
35  void(const std::string &, const sensor::TimedPointCloudData &));
37  void(const std::string &, const sensor::ImuData &));
39  void(const std::string &, const sensor::OdometryData &));
41  void(const std::string &, const sensor::FixedFramePoseData &));
43  void(const std::string &, const sensor::LandmarkData &));
44 
45  // Some of the platforms we run on may ship with a version of gmock which does
46  // not yet support move-only types.
47  MOCK_METHOD1(DoAddLocalSlamResultData, void(mapping::LocalSlamResultData *));
48  void AddLocalSlamResultData(std::unique_ptr<mapping::LocalSlamResultData>
49  local_slam_result_data) override {
50  DoAddLocalSlamResultData(local_slam_result_data.get());
51  }
52 };
53 
54 } // namespace testing
55 } // namespace mapping
56 } // namespace cartographer
57 
58 #endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_TRAJECTORY_BUILDER_H_
MOCK_METHOD2(AddSensorData, void(const std::string &, const sensor::TimedPointCloudData &))
MOCK_METHOD1(DoAddLocalSlamResultData, void(mapping::LocalSlamResultData *))
void AddLocalSlamResultData(std::unique_ptr< mapping::LocalSlamResultData > local_slam_result_data) override
virtual void AddSensorData(const std::string &sensor_id, const sensor::TimedPointCloudData &timed_point_cloud_data)=0


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58