// Boost.Geometry // Copyright (c) 2016 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // 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 "test_equals.hpp" #include #include #include template void test_polygon_polygon() { typedef bg::model::polygon

poly; typedef bg::model::ring

ring; test_geometry(case_1[0], case_1[0], true); test_geometry(case_1[0], case_1[1], false); test_geometry(case_1[0], case_1[1], false); test_geometry(case_1[0], case_1[1], false); test_geometry(case_2[0], case_2[1], false); test_geometry(case_3_sph[0], case_3_sph[1], false); test_geometry(case_3_2_sph[0], case_3_2_sph[1], true); test_geometry(case_4[0], case_4[1], false); test_geometry(case_5[0], case_5[1], false); test_geometry(case_6_sph[0], case_6_sph[1], false); test_geometry(case_7[0], case_7[1], false); test_geometry(case_8_sph[0], case_8_sph[1], false); test_geometry(case_9_sph[0], case_9_sph[1], false); test_geometry(case_10_sph[0], case_10_sph[1], false); test_geometry(case_11_sph[0], case_11_sph[1], false); test_geometry(case_12[0], case_12[1], false); test_geometry(case_13_sph[0], case_13_sph[1], false); test_geometry(case_14_sph[0], case_14_sph[1], false); test_geometry(case_15_sph[0], case_15_sph[1], false); test_geometry(case_16_sph[0], case_16_sph[1], false); test_geometry(case_17_sph[0], case_17_sph[1], false); test_geometry(case_18_sph[0], case_18_sph[1], false); } template void test_polygon_multi_polygon() { typedef bg::model::polygon

poly; typedef bg::model::ring

ring; typedef bg::model::multi_polygon mpoly; test_geometry(case_1[0], case_multi_2[0], false); test_geometry(case_2[0], case_multi_2[0], false); } template void test_multi_polygon_multi_polygon() { typedef bg::model::polygon

poly; typedef bg::model::multi_polygon mpoly; test_geometry(case_multi_2[0], case_multi_2[1], false); } template void test_linestring_linestring() { typedef bg::model::linestring

ls; test_geometry("LINESTRING(0 0, 2 2, 3 2)", "LINESTRING(0 0, 2 2, 3 2)", true); test_geometry("LINESTRING(1 0,2 2,2 3)", "LINESTRING(0 0, 2 2, 3 2)", false); } template void test_linestring_multi_linestring() { typedef bg::model::linestring

ls; typedef bg::model::multi_linestring mls; test_geometry("LINESTRING(0 0,10 0)", "MULTILINESTRING((1 0,2 0),(1 1,2 1))", false); test_geometry("LINESTRING(0 0,5 0,5 5,0 5,0 0)", "MULTILINESTRING((5 5,0 5,0 0),(0 0,5 0,5 5))", true); } template void test_multi_linestring_multi_linestring() { typedef bg::model::linestring

ls; typedef bg::model::multi_linestring mls; test_geometry("MULTILINESTRING((0 0,0 0,18 0,18 0,19 0,19 0,19 0,30 0,30 0))", "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0))", false); } template void test_all() { test_polygon_polygon

(); test_polygon_multi_polygon

(); test_multi_polygon_multi_polygon

(); test_linestring_linestring

(); test_linestring_multi_linestring

(); test_multi_linestring_multi_linestring

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