mock_trajectory_builder.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2018 The Cartographer Authors
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_TRAJECTORY_BUILDER_H_
00018 #define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_TRAJECTORY_BUILDER_H_
00019 
00020 #include "cartographer/mapping/trajectory_builder_interface.h"
00021 #include "glog/logging.h"
00022 #include "gmock/gmock.h"
00023 #include "gtest/gtest.h"
00024 
00025 namespace cartographer {
00026 namespace mapping {
00027 namespace testing {
00028 
00029 class MockTrajectoryBuilder : public mapping::TrajectoryBuilderInterface {
00030  public:
00031   MockTrajectoryBuilder() = default;
00032   ~MockTrajectoryBuilder() override = default;
00033 
00034   MOCK_METHOD2(AddSensorData,
00035                void(const std::string &, const sensor::TimedPointCloudData &));
00036   MOCK_METHOD2(AddSensorData,
00037                void(const std::string &, const sensor::ImuData &));
00038   MOCK_METHOD2(AddSensorData,
00039                void(const std::string &, const sensor::OdometryData &));
00040   MOCK_METHOD2(AddSensorData,
00041                void(const std::string &, const sensor::FixedFramePoseData &));
00042   MOCK_METHOD2(AddSensorData,
00043                void(const std::string &, const sensor::LandmarkData &));
00044 
00045   // Some of the platforms we run on may ship with a version of gmock which does
00046   // not yet support move-only types.
00047   MOCK_METHOD1(DoAddLocalSlamResultData, void(mapping::LocalSlamResultData *));
00048   void AddLocalSlamResultData(std::unique_ptr<mapping::LocalSlamResultData>
00049                                   local_slam_result_data) override {
00050     DoAddLocalSlamResultData(local_slam_result_data.get());
00051   }
00052 };
00053 
00054 }  // namespace testing
00055 }  // namespace mapping
00056 }  // namespace cartographer
00057 
00058 #endif  // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_TRAJECTORY_BUILDER_H_


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:35