// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // 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 template void test_all() { // 3-4-5 triangle //test_geometry >("LINESTRING(0 0,3 4)", 5); test_geometry >( "POLYGON((0 0,0 1,1 1,1 0,0 0))", 4); test_geometry >( "POLYGON((0 0,0 1,1 0,0 0))", 1.0 + 1.0 + sqrt(2.0)); test_geometry >( "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,2 1,2 2,1 2,1 1))", 20); } template void test_open() { typedef bg::model::polygon open_polygon; test_geometry("POLYGON((0 0,0 1,1 1,1 0))", 4); } template void test_empty_input() { bg::model::polygon

poly_empty; bg::model::ring

ring_empty; test_empty_input(poly_empty); test_empty_input(ring_empty); } int test_main(int, char* []) { //test_all >(); test_all >(); test_all >(); test_open >(); #if defined(HAVE_TTMATH) test_all >(); #endif // test_empty_input >(); return 0; }