|
19 | 19 |
|
20 | 20 | #include <gtest/gtest.h> |
21 | 21 |
|
22 | | -#include "../testutil/CompareGeoCoordinates.h" |
23 | | -#include "../testutil/CompareGeoRectangle.h" |
24 | 22 | #include <olp/core/geo/coordinates/GeoRectangle.h> |
25 | 23 | #include <olp/core/math/Math.h> |
| 24 | +#include "../testutil/CompareGeoCoordinates.h" |
| 25 | +#include "../testutil/CompareGeoRectangle.h" |
26 | 26 |
|
27 | 27 | namespace olp { |
28 | 28 | namespace geo { |
@@ -87,6 +87,18 @@ TEST(GeoRectangleTest, Containment) { |
87 | 87 | GeoRectangle(GeoCoordinates(0, 0), GeoCoordinates(0.05, 0.15)))); |
88 | 88 | } |
89 | 89 |
|
| 90 | +TEST(GeoRectangleTest, OperatorEqual) { |
| 91 | + EXPECT_EQ(GeoRectangle(GeoCoordinates(1, 2), GeoCoordinates(10, 20)), |
| 92 | + GeoRectangle(GeoCoordinates(1, 2), GeoCoordinates(10, 20))); |
| 93 | +} |
| 94 | + |
| 95 | +TEST(GeoRectangleTest, OperatorNotEqual) { |
| 96 | + EXPECT_NE(GeoRectangle(GeoCoordinates(0, 0), GeoCoordinates(1, 1)), |
| 97 | + GeoRectangle(GeoCoordinates(0, 0), GeoCoordinates(1, 2))); |
| 98 | + EXPECT_NE(GeoRectangle(GeoCoordinates(0, 0), GeoCoordinates(1, 1)), |
| 99 | + GeoRectangle(GeoCoordinates(1, 0), GeoCoordinates(1, 1))); |
| 100 | +} |
| 101 | + |
90 | 102 | TEST(GeoRectangleTest, BooleanUnion) { |
91 | 103 | // Non-connected |
92 | 104 | { |
|
0 commit comments