voronoi_geometry_type_test.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Boost.Polygon library voronoi_geometry_type_test.cpp file
  2. // Copyright Andrii Sydorchuk 2010-2012.
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. // See http://www.boost.org for updates, documentation, and revision history.
  7. #include <boost/core/lightweight_test.hpp>
  8. #include <boost/polygon/voronoi_geometry_type.hpp>
  9. using namespace boost::polygon;
  10. void source_category_test1()
  11. {
  12. BOOST_TEST(belongs(SOURCE_CATEGORY_SINGLE_POINT, GEOMETRY_CATEGORY_POINT));
  13. BOOST_TEST(belongs(SOURCE_CATEGORY_SEGMENT_START_POINT, GEOMETRY_CATEGORY_POINT));
  14. BOOST_TEST(belongs(SOURCE_CATEGORY_SEGMENT_END_POINT, GEOMETRY_CATEGORY_POINT));
  15. BOOST_TEST(!belongs(SOURCE_CATEGORY_INITIAL_SEGMENT, GEOMETRY_CATEGORY_POINT));
  16. BOOST_TEST(!belongs(SOURCE_CATEGORY_REVERSE_SEGMENT, GEOMETRY_CATEGORY_POINT));
  17. BOOST_TEST(!belongs(SOURCE_CATEGORY_SINGLE_POINT, GEOMETRY_CATEGORY_SEGMENT));
  18. BOOST_TEST(!belongs(SOURCE_CATEGORY_SEGMENT_START_POINT, GEOMETRY_CATEGORY_SEGMENT));
  19. BOOST_TEST(!belongs(SOURCE_CATEGORY_SEGMENT_END_POINT, GEOMETRY_CATEGORY_SEGMENT));
  20. BOOST_TEST(belongs(SOURCE_CATEGORY_INITIAL_SEGMENT, GEOMETRY_CATEGORY_SEGMENT));
  21. BOOST_TEST(belongs(SOURCE_CATEGORY_REVERSE_SEGMENT, GEOMETRY_CATEGORY_SEGMENT));
  22. }
  23. int main()
  24. {
  25. source_category_test1();
  26. return boost::report_errors();
  27. }