Drake
maliput_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 api {
10 namespace test {
11 
12 // Compares equality within @p tolerance deviation of two GeoPosition objects.
13 // @param pos1 A GeoPosition object to compare.
14 // @param pos2 A GeoPosition object to compare.
15 // @param tolerance An allowable absolute deviation for each GeoPosition's
16 // coordinate.
17 // @return ::testing::AssertionFailure() When GeoPosition objects are different.
18 // @return ::testing::AssertionSuccess() When GeoPosition objects are within
19 // the @p tolerance deviation.
20 ::testing::AssertionResult IsGeoPositionClose(const GeoPosition& pos1,
21  const GeoPosition& pos2,
22  double tolerance);
23 
24 // Compares equality within @p tolerance deviation of two LanePosition objects.
25 // @param pos1 A LanePosition object to compare.
26 // @param pos2 A LanePosition object to compare.
27 // @param tolerance An allowable absolute deviation for each LanePosition's
28 // coordinate.
29 // @return ::testing::AssertionFailure() When LanePosition objects are
30 // different.
31 // @return ::testing::AssertionSuccess() When LanePosition objects are equal or
32 // within the @p tolerance deviation.
33 ::testing::AssertionResult IsLanePositionClose(const LanePosition& pos1,
34  const LanePosition& pos2,
35  double tolerance);
36 
37 // Compares equality within @p tolerance deviation of two Rotation objects.
38 // Comparison will evaluate the inner Rotation's Euler angles.
39 // @param rot1 A Rotation object to compare.
40 // @param rot2 A Rotation object to compare.
41 // @param tolerance An allowable absolute deviation for each Rotation's
42 // coordinate.
43 // @return ::testing::AssertionFailure() When Rotation objects are different.
44 // @return ::testing::AssertionSuccess() When Rotation objects are equal or
45 // within the @p tolerance deviation.
46 ::testing::AssertionResult IsRotationClose(const Rotation& rot1,
47  const Rotation& rot2,
48  double tolerance);
49 
50 // Compares equality within @p tolerance deviation of two RBounds objects.
51 // @param rbounds1 A RBounds object to compare.
52 // @param rbounds2 A RBounds object to compare.
53 // @param tolerance An allowable absolute deviation for each RBounds's instance
54 // value.
55 // @return ::testing::AssertionFailure() When RBounds objects are different.
56 // @return ::testing::AssertionSuccess() When RBounds objects are equal or
57 // within the @p tolerance deviation.
58 ::testing::AssertionResult IsRBoundsClose(const RBounds& rbounds1,
59  const RBounds& rbounds2,
60  double tolerance);
61 
62 // Compares equality within @p tolerance deviation of two HBounds objects.
63 // @param hbounds1 A HBounds object to compare.
64 // @param hbounds1 A HBounds object to compare.
65 // @param tolerance An allowable absolute deviation for each HBounds's instance
66 // value.
67 // @return ::testing::AssertionFailure() When HBounds objects are different.
68 // @return ::testing::AssertionSuccess() When HBounds objects are equal or
69 // within the @p tolerance deviation.
70 ::testing::AssertionResult IsHBoundsClose(const HBounds& hbounds1,
71  const HBounds& hbounds2,
72  double tolerance);
73 
74 } // namespace test
75 } // namespace api
76 } // namespace maliput
77 } // namespace drake
::testing::AssertionResult IsRBoundsClose(const RBounds &rbounds1, const RBounds &rbounds2, double tolerance)
Definition: maliput_types_compare.cc:147
::testing::AssertionResult IsHBoundsClose(const HBounds &hbounds1, const HBounds &hbounds2, double tolerance)
Definition: maliput_types_compare.cc:184
Definition: automotive_demo.cc:88
::testing::AssertionResult IsGeoPositionClose(const GeoPosition &pos1, const GeoPosition &pos2, double tolerance)
Definition: maliput_types_compare.cc:11
::testing::AssertionResult IsRotationClose(const Rotation &rot1, const Rotation &rot2, double tolerance)
Definition: maliput_types_compare.cc:101
::testing::AssertionResult IsLanePositionClose(const LanePosition &pos1, const LanePosition &pos2, double tolerance)
Definition: maliput_types_compare.cc:56