| 25 | #include "math/mBox.h" |
| 26 | |
| 27 | TEST(Box3F, GetOverlap) |
| 28 | { |
| 29 | Box3F b1(Point3F(-1, -1, -1), Point3F(1, 1, 1)); |
| 30 | EXPECT_EQ(b1.getOverlap(b1), b1) |
| 31 | << "A box's overlap with itself should be itself."; |
| 32 | |
| 33 | Box3F b2(Point3F(0, 0, 0), Point3F(1, 1, 1)); |
| 34 | EXPECT_EQ(b1.getOverlap(b2), b2) |
| 35 | << "Box's overlap should be the intersection of two boxes."; |
| 36 | |
| 37 | Box3F b3(Point3F(10, 10, 10), Point3F(11, 11, 11)); |
| 38 | EXPECT_TRUE(b1.getOverlap(b3).isEmpty()) |
| 39 | << "Overlap of boxes that do not overlap should be empty."; |
| 40 | } |
| 41 | |
| 42 | #endif |
nothing calls this directly
no test coverage detected