Added a test to check Point / Weighted_point conversions

and fixed a previous test that used now-disabled implicit conversions
This commit is contained in:
Mael Rouxel-Labbé 2017-04-11 18:15:20 +02:00
parent 06b721d7ce
commit c54b09dd82
3 changed files with 13 additions and 3 deletions

View File

@ -64,6 +64,11 @@ _test_cls_point_2(const R& )
CGAL::Weighted_point_2<R> wp(p1);
CGAL::Point_2<R> p7(wp);
CGAL_static_assertion(!(boost::is_convertible<CGAL::Weighted_point_2<R>,
CGAL::Point_2<R> >::value));
CGAL_static_assertion(!(boost::is_convertible<CGAL::Point_2<R>,
CGAL::Weighted_point_2<R> >::value));
std::cout << '.';
assert( p3 == CGAL::Point_2<R>(FT(n1), FT(n2)) );

View File

@ -62,6 +62,11 @@ _test_cls_point_3(const R& )
CGAL::Weighted_point_3<R> wp(p1);
CGAL::Point_3<R> p7(wp);
CGAL_static_assertion(!(boost::is_convertible<CGAL::Weighted_point_3<R>,
CGAL::Point_3<R> >::value));
CGAL_static_assertion(!(boost::is_convertible<CGAL::Point_3<R>,
CGAL::Weighted_point_3<R> >::value));
std::cout << '.';
assert( p3 == CGAL::Point_3<R>(FT(n1), FT(n2), FT(n3)) );

View File

@ -103,11 +103,11 @@ _test_fct_weighted_point_3(const R& )
assert( CGAL::power_side_of_oriented_power_sphere(wp6_b, wp6b_b) == CGAL::ON_POSITIVE_SIDE );
assert( CGAL::power_side_of_oriented_power_sphere(wp3, wp1, wp6) == CGAL::ON_NEGATIVE_SIDE
&& ! CGAL::Segment_3<R>(wp3, wp1).has_on(wp6) );
&& ! CGAL::Segment_3<R>(p3, p1).has_on(p6) );
assert( CGAL::power_side_of_oriented_power_sphere(wp5, wp6, wp5) == CGAL::ON_ORIENTED_BOUNDARY
&& CGAL::Segment_3<R>(wp5, wp6).has_on(wp5) );
&& CGAL::Segment_3<R>(p5, p6).has_on(p5) );
assert( CGAL::power_side_of_oriented_power_sphere(wp3, wp6, wp1) == CGAL::ON_POSITIVE_SIDE
&& CGAL::Segment_3<R>(wp3, wp6).has_on(wp1) );
&& CGAL::Segment_3<R>(p3, p6).has_on(p1) );
assert( CGAL::power_side_of_oriented_power_sphere(wp3_b, wp6b_b, wp1_b) == CGAL::ON_NEGATIVE_SIDE );
assert( CGAL::power_side_of_oriented_power_sphere(wp1_b, wp3_b, wp3_b) == CGAL::ON_ORIENTED_BOUNDARY );