|
| 1 | +// Copyright 2023 The Autoware Contributors |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +#include "component_interface_specs/planning.hpp" |
| 16 | +#include "gtest/gtest.h" |
| 17 | + |
| 18 | +TEST(planning, interface) |
| 19 | +{ |
| 20 | + { |
| 21 | + using planning_interface::RouteState; |
| 22 | + RouteState state; |
| 23 | + size_t depth = 1; |
| 24 | + EXPECT_EQ(state.depth, depth); |
| 25 | + EXPECT_EQ(state.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE); |
| 26 | + EXPECT_EQ(state.durability, RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL); |
| 27 | + } |
| 28 | + |
| 29 | + { |
| 30 | + using planning_interface::Route; |
| 31 | + Route route; |
| 32 | + size_t depth = 1; |
| 33 | + EXPECT_EQ(route.depth, depth); |
| 34 | + EXPECT_EQ(route.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE); |
| 35 | + EXPECT_EQ(route.durability, RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL); |
| 36 | + } |
| 37 | + |
| 38 | + { |
| 39 | + using planning_interface::NormalRoute; |
| 40 | + NormalRoute route; |
| 41 | + size_t depth = 1; |
| 42 | + EXPECT_EQ(route.depth, depth); |
| 43 | + EXPECT_EQ(route.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE); |
| 44 | + EXPECT_EQ(route.durability, RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL); |
| 45 | + } |
| 46 | + |
| 47 | + { |
| 48 | + using planning_interface::MrmRoute; |
| 49 | + MrmRoute route; |
| 50 | + size_t depth = 1; |
| 51 | + EXPECT_EQ(route.depth, depth); |
| 52 | + EXPECT_EQ(route.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE); |
| 53 | + EXPECT_EQ(route.durability, RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL); |
| 54 | + } |
| 55 | + |
| 56 | + { |
| 57 | + using planning_interface::Trajectory; |
| 58 | + Trajectory trajectory; |
| 59 | + size_t depth = 1; |
| 60 | + EXPECT_EQ(trajectory.depth, depth); |
| 61 | + EXPECT_EQ(trajectory.reliability, RMW_QOS_POLICY_RELIABILITY_RELIABLE); |
| 62 | + EXPECT_EQ(trajectory.durability, RMW_QOS_POLICY_DURABILITY_VOLATILE); |
| 63 | + } |
| 64 | +} |
0 commit comments