Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
21
libs/geometry/geometry_tests/rect_test.cpp
Normal file
21
libs/geometry/geometry_tests/rect_test.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "geometry/rect2d.hpp"
|
||||
#include "testing/testing.hpp"
|
||||
|
||||
UNIT_TEST(Rect_Intersect)
|
||||
{
|
||||
m2::RectD r(0, 0, 100, 100);
|
||||
m2::RectD r1(10, 10, 20, 20);
|
||||
|
||||
TEST(r1.IsIntersect(r), ());
|
||||
TEST(r.IsIntersect(r1), ());
|
||||
|
||||
m2::RectD r2(-100, -100, -50, -50);
|
||||
|
||||
TEST(!r2.IsIntersect(r), ());
|
||||
TEST(!r.IsIntersect(r2), ());
|
||||
|
||||
m2::RectD r3(-10, -10, 10, 10);
|
||||
|
||||
TEST(r3.IsIntersect(r), ());
|
||||
TEST(r.IsIntersect(r3), ());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue