// Boost.Geometry (aka GGL, Generic Geometry Library) test file // // Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands // Copyright Bruno Lalande 2008, 2009 // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #include #include #include #include #include #include #include #include template void test_geometry(bool check = true) { G geometry; typedef typename bg::point_type::type P; bg::append(geometry, bg::make_zero

()); if (check) { BOOST_CHECK_EQUAL(bg::num_points(geometry), 1u); } // Append a range std::vector

v; v.push_back(bg::make_zero

()); v.push_back(bg::make_zero

()); bg::append(geometry, v); if (check) { BOOST_CHECK_EQUAL(bg::num_points(geometry), 3u); } bg::clear(geometry); if (check) { BOOST_CHECK_EQUAL(bg::num_points(geometry), 0u); } //P p = boost::range::front(geometry); } template void test_all() { test_geometry

(false); test_geometry >(false); test_geometry >(false); test_geometry >(); test_geometry >(); test_geometry >(); test_geometry >(); test_geometry >(); //test_geometry >(); test_geometry >(); } int test_main(int, char* []) { test_all(); test_all >(); test_all >(); test_all >(); #ifdef HAVE_TTMATH test_all >(); #endif return 0; }