diff --git a/modules/geom/tests/test_composite2.cc b/modules/geom/tests/test_composite2.cc index 5e437a730a79a0c9ccaa0f6066210f70c22c6d94..acec86fb900f5b32460c1cfb4fdb85855474b9be 100644 --- a/modules/geom/tests/test_composite2.cc +++ b/modules/geom/tests/test_composite2.cc @@ -37,6 +37,17 @@ BOOST_AUTO_TEST_CASE(line_init2) BOOST_CHECK_EQUAL(geom::Length(line.GetDirection()), 1.0); } +BOOST_AUTO_TEST_CASE(rectangle2) +{ + Rectangle2 rect; + try{ + BOOST_CHECK_THROW(rect[2]=geom::Vec2(0,0), OutOfRangeException); + }catch(...) + { + BOOST_ERROR("Failed to catch OutOfRangeException"); + } +} + BOOST_AUTO_TEST_CASE(is_on_line2) { Line2 line(geom::Vec2(0,0), geom::Vec2(1,0)); diff --git a/modules/geom/tests/test_composite3.cc b/modules/geom/tests/test_composite3.cc index 83cbb5d19cb3dafd2b0379fcee1cb8cdad269949..317068280dd1a761c288e88b2a45e53089929547 100644 --- a/modules/geom/tests/test_composite3.cc +++ b/modules/geom/tests/test_composite3.cc @@ -151,8 +151,12 @@ BOOST_AUTO_TEST_CASE(func_composite3) BOOST_CHECK(Equal(IntersectionPoint(l2,l3), v3)); BOOST_CHECK(!AreIntersecting(l3, l4)); - - BOOST_CHECK_THROW(IntersectionPoint(l3,l4), GeomException); + try{ + BOOST_CHECK_THROW(IntersectionPoint(l3,l4), GeomException); + }catch(...) + { + BOOST_ERROR("Failed to catch GeomException"); + } BOOST_CHECK(Equal(IntersectionPoint(p1,l3), v1)); BOOST_CHECK(Equal(IntersectionPoint(l3,p1), v1));