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