// Boost.Geometry (aka GGL, Generic Geometry Library) test file // // Copyright Barend Gehrels 2007-2009, Geodan, 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 #define BOOST_GEOMETRY_TEST_RING #if defined(BOOST_GEOMETRY_TEST_RING) #include #include #include #include #elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT) #include #include #include #include #else #include #include #include #include #endif #include #include #include // ---------------------------------------------------------------------------- template void test_geometry(G const& geometry, int expected_size = 0) { #if defined(BOOST_GEOMETRY_TEST_RING) BOOST_CONCEPT_ASSERT( (bg::concept::ConstRing) ); #elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT) BOOST_CONCEPT_ASSERT( (bg::concept::ConstMultiPoint) ); #else BOOST_CONCEPT_ASSERT( (bg::concept::ConstLinestring) ); #endif typedef typename bg::point_type::type P; typedef typename bg::coordinate_type

::type C; // Check range-like behaviour BOOST_CHECK_EQUAL(boost::size(geometry), expected_size); } template void test_all() { test_geometry(std::vector

()); test_geometry(std::deque

()); //test_geometry(std::list

()); test_geometry(boost::array(), 5); double vertices[][3] = { {-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1}, {-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1} }; test_geometry(vertices, 8); } int test_main(int, char* []) { /* test_all(); test_all >(); test_all >(); test_all >(); test_all >(); test_all >(); */ test_all >(); //test_all >(); return 0; }