[test][algorithms][disjoint] add test cases with empty multipoints;

enable tests for the combinations:
* point / multipoint
* multipoint / multipoint
* multipoint / segment
* multipoint / box
This commit is contained in:
Menelaos Karavelas
2014-07-22 15:43:18 +03:00
parent 7cceafa252
commit 79d8a2c59b

View File

@@ -151,6 +151,10 @@ inline void test_point_multipoint()
tester::apply(from_wkt<P>("POINT(0 0)"),
from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
true);
tester::apply(from_wkt<P>("POINT(0 0)"),
from_wkt<MP>("MULTIPOINT()"),
true);
}
template <typename P>
@@ -167,6 +171,14 @@ inline void test_multipoint_multipoint()
tester::apply(from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
true);
tester::apply(from_wkt<MP>("MULTIPOINT()"),
from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
true);
tester::apply(from_wkt<MP>("MULTIPOINT(0 0,1 0)"),
from_wkt<MP>("MULTIPOINT()"),
true);
}
//============================================================================
@@ -258,6 +270,10 @@ inline void test_multipoint_segment()
tester::apply(from_wkt<MP>("MULTIPOINT(1 1,2 2)"),
from_wkt<S>("SEGMENT(0 0,2 0)"),
true);
tester::apply(from_wkt<MP>("MULTIPOINT()"),
from_wkt<S>("SEGMENT(0 0,2 0)"),
true);
}
template <typename P>
@@ -396,6 +412,10 @@ inline void test_multipoint_box()
tester::apply(from_wkt<MP>("MULTIPOINT(3 3,4 4)"),
from_wkt<B>("BOX(0 0,2 2)"),
true);
tester::apply(from_wkt<MP>("MULTIPOINT()"),
from_wkt<B>("BOX(0 0,2 2)"),
true);
}
template <typename P>
@@ -1233,10 +1253,9 @@ inline void test_pointlike_pointlike()
typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
test_point_point<point_type>();
// not implemented yet
// test_point_multipoint<point_type>();
test_point_multipoint<point_type>();
// test_multipoint_multipoint<point_type>();
test_multipoint_multipoint<point_type>();
}
template <typename CoordinateType>
@@ -1251,7 +1270,7 @@ inline void test_pointlike_linear()
// not implemented yet
// test_multipoint_linestring<point_type>();
// test_multipoint_multilinestring<point_type>();
// test_multipoint_segment<point_type>();
test_multipoint_segment<point_type>();
}
template <typename CoordinateType>
@@ -1268,7 +1287,7 @@ inline void test_pointlike_areal()
// test_multipoint_polygon<point_type>();
// test_multipoint_multipolygon<point_type>();
// test_multipoint_ring<point_type>();
// test_multipoint_box<point_type>();
test_multipoint_box<point_type>();
}
template <typename CoordinateType>