Drake
multilane_types_compare.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <gtest/gtest.h>
4 
6 
7 namespace drake {
8 namespace maliput {
9 namespace multilane {
10 namespace test {
11 
12 // Compares equality within @p tolerance deviation of two EndpointXy objects.
13 // @param xy1 An EndpointXy object to compare.
14 // @param xy2 An EndpointXy object to compare.
15 // @param tolerance An allowable absolute deviation for each EndpointXy's
16 // coordinate.
17 // @return ::testing::AssertionFailure() When EndpointXy objects are different.
18 // @return ::testing::AssertionSuccess() When EndpointXy objects are within
19 // the @p tolerance deviation.
20 
21 // TODO(agalbachicar) Given that EndpointXy is composed of two lengths and
22 // one angle, tolerance must be replaced into two distinct
23 // values to match each magnitude.
24 ::testing::AssertionResult IsEndpointXyClose(const EndpointXy& xy1,
25  const EndpointXy& xy2,
26  double tolerance);
27 
28 // Compares equality within @p tolerance deviation of two EndpointZ objects.
29 // @param z1 An EndpointZ object to compare.
30 // @param z2 An EndpointZ object to compare.
31 // @param tolerance An allowable absolute deviation for each EndpointZ's
32 // coordinate.
33 // @return ::testing::AssertionFailure() When EndpointZ objects are different.
34 // @return ::testing::AssertionSuccess() When EndpointZ objects are within
35 // the @p tolerance deviation.
36 
37 // TODO(agalbachicar) Given that EndpointZ is composed of different
38 // magnitudes, tolerance must be replaced into distinct
39 // values to match each magnitude.
40 ::testing::AssertionResult IsEndpointZClose(const EndpointZ& z1,
41  const EndpointZ& z2,
42  double tolerance);
43 
44 // Compares equality within @p tolerance deviation of two Endpoint objects.
45 // @param pos1 An Endpoint object to compare.
46 // @param pos2 An Endpoint object to compare.
47 // @param tolerance An allowable absolute deviation for each Endpoint's
48 // coordinate.
49 // @return ::testing::AssertionFailure() When Endpoint objects are different.
50 // @return ::testing::AssertionSuccess() When Endpoint objects are within
51 // the @p tolerance deviation.
52 
53 // TODO(agalbachicar) Given that EndpointXy and EndpointZ are composed of
54 // different magnitudes, tolerance must be replaced into
55 // distinct values to match each magnitude.
56 ::testing::AssertionResult IsEndpointClose(const Endpoint& pos1,
57  const Endpoint& pos2,
58  double tolerance);
59 } // namespace test
60 } // namespace multilane
61 } // namespace maliput
62 } // namespace drake
::testing::AssertionResult IsEndpointZClose(const EndpointZ &z1, const EndpointZ &z2, double tolerance)
Definition: multilane_types_compare.cc:57
Definition: automotive_demo.cc:88
Definition: arc_road_curve.cc:11
::testing::AssertionResult IsEndpointXyClose(const EndpointXy &xy1, const EndpointXy &xy2, double tolerance)
Definition: multilane_types_compare.cc:12
::testing::AssertionResult IsEndpointClose(const Endpoint &p1, const Endpoint &p2, double tolerance)
Definition: multilane_types_compare.cc:112