|
|
@@ -38,6 +38,21 @@ LOLUNIT_FIXTURE(BoxTest) |
|
|
|
|
|
|
|
LOLUNIT_ASSERT_EQUAL(false, BoxIsectBox(b4, b5)); |
|
|
|
} |
|
|
|
|
|
|
|
LOLUNIT_TEST(Box2DMove) |
|
|
|
{ |
|
|
|
Box2D b1(vec2(0.f, 0.f), vec2(1.f, 1.f)); |
|
|
|
Box2D b2(vec2(2.f, 2.f), vec2(3.f, 3.f)); |
|
|
|
|
|
|
|
b1 += vec2(0.6f, 0.6f); |
|
|
|
LOLUNIT_ASSERT_EQUAL(false, BoxIsectBox(b1, b2)); |
|
|
|
|
|
|
|
b1 += vec2(0.6f, 0.6f); |
|
|
|
LOLUNIT_ASSERT_EQUAL(true, BoxIsectBox(b1, b2)); |
|
|
|
|
|
|
|
b1 -= vec2(0.0f, 0.6f); |
|
|
|
LOLUNIT_ASSERT_EQUAL(false, BoxIsectBox(b1, b2)); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
} /* namespace lol */ |
|
|
|