length_multi.cpp 984 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. //
  3. // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
  4. // Use, modification and distribution is subject to the Boost Software License,
  5. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #include <algorithms/test_length.hpp>
  8. #include <boost/geometry/geometries/geometries.hpp>
  9. #include <boost/geometry/geometries/point_xy.hpp>
  10. template <typename P>
  11. void test_all()
  12. {
  13. test_geometry<bg::model::multi_linestring<bg::model::linestring<P> > >
  14. ("MULTILINESTRING((0 0,3 4,4 3))", 5 + sqrt(2.0));
  15. }
  16. template <typename P>
  17. void test_empty_input()
  18. {
  19. test_empty_input(bg::model::multi_linestring<P>());
  20. }
  21. int test_main( int , char* [] )
  22. {
  23. test_all<bg::model::d2::point_xy<double> >();
  24. #ifdef HAVE_TTMATH
  25. test_all<bg::model::d2::point_xy<ttmath_big> >();
  26. #endif
  27. // test_empty_input<bg::model::d2::point_xy<int> >();
  28. return 0;
  29. }