diff --git a/test/geom/aabb.cpp b/test/geom/aabb.cpp index 35583bd4..1925e822 100644 --- a/test/geom/aabb.cpp +++ b/test/geom/aabb.cpp @@ -13,19 +13,17 @@ main (int, char**) util::TAP::logger tap; { - // Test contraction - const aabb2f val { { 2, 2 }, { 8, 8 } }; - const aabb2f res { { 3, 3 }, { 7, 7 } }; + const aabb2f val { { 1, 2 }, { 8, 5 } }; + const aabb2f res { { 3, 3 }, { 6, 4 } }; - tap.expect_eq (val.contract (1.f), res, "over contraction"); + tap.expect_eq (val.contract ({2.f, 1.f}), res, "aabb::contract"); } { - // Test expansion - const aabb2f val { { 2, 2 }, { 8, 8 } }; - const aabb2f res { { 1, 1 }, { 9, 9 } }; + const aabb2f val { { 2, 1 }, { 3, 6 } }; + const aabb2f res { { 1, -1 }, { 4, 8 } }; - tap.expect_eq (val.expand (1.f), res, "expansion"); + tap.expect_eq (val.expand ({1.f, 2.f}), res, "aabb::expand"); } return tap.status ();