cloud/internal/testing/test_helpers.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_CLOUD_INTERNAL_TESTING_TEST_HELPERS_H
18 #define CARTOGRAPHER_CLOUD_INTERNAL_TESTING_TEST_HELPERS_H
19 
20 #include "cartographer/cloud/proto/map_builder_service.pb.h"
22 #include "google/protobuf/util/message_differencer.h"
23 
24 namespace cartographer {
25 namespace cloud {
26 namespace testing {
27 
28 using DataPredicateType = std::function<bool(const sensor::Data &)>;
29 using ProtoPredicateType =
30  std::function<bool(const google::protobuf::Message &)>;
31 
32 template <typename T>
34 
35 template <>
36 DataPredicateType BuildDataPredicateEquals<proto::AddImuDataRequest>(
37  const proto::AddImuDataRequest &proto);
38 template <>
39 DataPredicateType BuildDataPredicateEquals<proto::AddFixedFramePoseDataRequest>(
40  const proto::AddFixedFramePoseDataRequest &proto);
41 template <>
42 DataPredicateType BuildDataPredicateEquals<proto::AddOdometryDataRequest>(
43  const proto::AddOdometryDataRequest &proto);
44 template <>
45 DataPredicateType BuildDataPredicateEquals<proto::AddLandmarkDataRequest>(
46  const proto::AddLandmarkDataRequest &proto);
47 template <>
48 DataPredicateType BuildDataPredicateEquals<proto::AddRangefinderDataRequest>(
49  const proto::AddRangefinderDataRequest &proto);
50 
52  const google::protobuf::Message *proto);
53 
54 } // namespace testing
55 } // namespace cloud
56 } // namespace cartographer
57 
58 #endif // CARTOGRAPHER_CLOUD_INTERNAL_TESTING_TEST_HELPERS_H
std::function< bool(const google::protobuf::Message &)> ProtoPredicateType
DataPredicateType BuildDataPredicateEquals(const T &proto)
ProtoPredicateType BuildProtoPredicateEquals(const google::protobuf::Message *proto)
std::function< bool(const sensor::Data &)> DataPredicateType


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