/* * Copyright 2018 The Cartographer Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef CARTOGRAPHER_GRPC_INTERNAL_TESTING_TEST_HELPERS_H #define CARTOGRAPHER_GRPC_INTERNAL_TESTING_TEST_HELPERS_H #include "cartographer/sensor/dispatchable.h" #include "cartographer_grpc/proto/map_builder_service.pb.h" #include "google/protobuf/util/message_differencer.h" namespace cartographer { namespace cloud { namespace testing { using DataPredicateType = std::function; using ProtoPredicateType = std::function; template DataPredicateType BuildDataPredicateEquals(const T &proto); template <> DataPredicateType BuildDataPredicateEquals( const proto::AddImuDataRequest &proto); template <> DataPredicateType BuildDataPredicateEquals( const proto::AddFixedFramePoseDataRequest &proto); template <> DataPredicateType BuildDataPredicateEquals( const proto::AddOdometryDataRequest &proto); template <> DataPredicateType BuildDataPredicateEquals( const proto::AddLandmarkDataRequest &proto); template <> DataPredicateType BuildDataPredicateEquals( const proto::AddRangefinderDataRequest &proto); ProtoPredicateType BuildProtoPredicateEquals( const google::protobuf::Message *proto); } // namespace testing } // namespace cloud } // namespace cartographer #endif // CARTOGRAPHER_GRPC_INTERNAL_TESTING_TEST_HELPERS_H