// 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 #include #include #include template void test_all() { // 3-4-5 triangle test_geometry >("LINESTRING(0 0,3 4)", 5); // 3-4-5 plus 1-1 test_geometry >("LINESTRING(0 0,3 4,4 3)", 5 + sqrt(2.0)); test_geometry >("LINESTRING(0 0,3 4,4 3)", 5 + sqrt(2.0)); test_geometry >("LINESTRING(0 0,3 4,4 3)", 5 + sqrt(2.0)); // Geometries with length zero test_geometry

("POINT(0 0)", 0); test_geometry >("POLYGON((0 0,0 1,1 1,1 0,0 0))", 0); } template void test_empty_input() { test_empty_input(bg::model::linestring

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