diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-10-20 17:29:01 +0300 |
---|---|---|
committer | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-10-20 17:29:01 +0300 |
commit | ecc78cfba7c33bcc070391d989e7ef0c2467bd85 (patch) | |
tree | 089fe585a699f8766c29a7f69c75953627fba70b /geometry/geometry_tests | |
parent | 4737cdf2ce045c40c7af9f35a41b20c733e583c0 (diff) |
Geometry unit test.
Diffstat (limited to 'geometry/geometry_tests')
-rw-r--r-- | geometry/geometry_tests/region_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/geometry/geometry_tests/region_test.cpp b/geometry/geometry_tests/region_test.cpp index 1076631d34..8c9899d3b3 100644 --- a/geometry/geometry_tests/region_test.cpp +++ b/geometry/geometry_tests/region_test.cpp @@ -134,6 +134,15 @@ UNIT_TEST(Region) region.AddPoint(P(34.4, 33.2)); TEST(region.IsValid(), ()); + { + // equality case + { + P const data[] = { P(1, 1), P(0, 4.995), P(1, 4.999996), P(1.000003, 5.000001), P(0.5, 10), P(10, 10), P(10, 1) }; + region.Assign(data, data + ARRAY_SIZE(data)); + } + TEST(!region.Contains(P(0.9999987, 0.9999938)), ()); + TEST(!region.Contains(P(0.999998, 4.9999987)), ()); + } } UNIT_TEST(Region_Contains_int32) |