| 144 | } |
| 145 | } |
| 146 | void test_rect_within(Rect<int> r1, Rect<int> r2, bool expected) |
| 147 | { |
| 148 | if (r1.within(r2) != expected) |
| 149 | { |
| 150 | LogError("Rect %s incorrectly %s rect %s", r2, expected ? "not within" : "within", r1); |
| 151 | exit(EXIT_FAILURE); |
| 152 | } |
| 153 | } |
| 154 | void test_rect_intersects(Rect<int> r1, Rect<int> r2, bool expected) |
| 155 | { |
| 156 | if (r1.intersects(r2) != expected) |