From 959f0738a023ab9be5e01f85a44537c9925acbfe Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Tue, 9 Dec 2008 10:41:01 +0000 Subject: [PATCH] wrap up Test/_test_coercion_traits.h move tests for binary functors into test for explicit interoperable as they are supposed to --- .../include/CGAL/Test/_test_coercion_traits.h | 261 +++++++++++++----- .../test/Number_types/Coercion_traits.cpp | 188 ++++++------- .../Sqrt_extension_CORE_arithmetic_kernel.cpp | 7 +- .../Sqrt_extension_LEDA_arithmetic_kernel.cpp | 5 +- .../test/Polynomial/Coercion_traits.cpp | 2 +- 5 files changed, 287 insertions(+), 176 deletions(-) diff --git a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h index d6c684ff8ef..d39cde7dcb5 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h @@ -29,8 +29,121 @@ // These are test functions for the Coercion_traits CGAL_BEGIN_NAMESPACE - namespace INTERN_COERCION_TRAITS { +// this test implicit interoperable +template< class A, class B, class Type > void test_implicit_interoperable(); +template< class FROM, class TO > void test_implicit_interoperable_from_to(); + +// this is testing explicit interoperability only +template void test_explicit_interoperable(); +template void test_explicit_interoperable_from_to(); + +namespace INTERN_COERCION_TRAITS { + +template +void test_implicit_interoperable_for_real_embeddable (CGAL::Tag_false){}; + +template +void test_implicit_interoperable_for_real_embeddable (CGAL::Tag_true){ + // two sided test for interoperability with int + A a; + B b; + a = A(-5); + b = B(-2); + // a < b + assert (!(a == b)); + assert ( (a != b)); + assert ( (a < b)); + assert ( (a <= b)); + assert (!(a > b)); + assert (!(a >= b)); + + assert (!(b == a)); + assert ( (b != a)); + assert (!(b < a)); + assert (!(b <= a)); + assert ( (b > a)); + assert ( (b >= a)); + + // a > b + a = A(5); + b = B(2); + assert (!(a == b)); + assert ( (a != b)); + assert (!(a < b)); + assert (!(a <= b)); + assert ( (a > b)); + assert ( (a >= b)); + + assert (!(b == a)); + assert ( (b != a)); + assert ( (b < a)); + assert ( (b <= a)); + assert (!(b > a)); + assert (!(b >= a)); + + // a == b + a = A(3); + b = B(3); + assert ( (a == b)); + assert (!(a != b)); + assert (!(a < b)); + assert ( (a <= b)); + assert (!(a > b)); + assert ( (a >= b)); + + assert ( (b == a)); + assert (!(b != a)); + assert (!(b < a)); + assert ( (b <= a)); + assert (!(b > a)); + assert ( (b >= a)); +}; + + +template +void test_implicit_interoperable_for_algebraic_structure +(CGAL::Null_tag){}; + +template +void test_implicit_interoperable_for_algebraic_structure +(CGAL::Integral_domain_without_division_tag){ + typedef CGAL::Coercion_traits CT; + typedef typename CT::Type C; + A a(6); B b(2); + assert(a + b == C(8)); + assert(a - b == C(4)); + assert(a * b == C(12)); + + assert(b + a == C(8)); + assert(b - a == C(-4)); + assert(b * a == C(12)); + + C c; + c = C(4); assert((c+= A(3)) == C(7)); + c = C(4); assert((c-= A(3)) == C(1)); + c = C(4); assert((c*= A(3)) == C(12)); + + c = C(4); assert((c+= B(3)) == C(7)); + c = C(4); assert((c-= B(3)) == C(1)); + c = C(4); assert((c*= B(3)) == C(12)); +}; + +template +void test_implicit_interoperable_for_algebraic_structure +(CGAL::Field_tag){ + test_implicit_interoperable_for_algebraic_structure + (CGAL::Integral_domain_without_division_tag()); + + typedef CGAL::Coercion_traits CT; + typedef typename CT::Type C; + A a(6); B b(2); + assert(a / b == C(3)); + assert(b / a == C(2)/C(6)); + C c; + c = C(4); assert((c /= A(2)) == C(2)); + c = C(4); assert((c /= B(2)) == C(2)); +}; template< class A, class B, class Type, class Compare > class Test_compare { @@ -163,18 +276,15 @@ class Test_mod< A, B, Type, CGAL::Null_functor > { }; -template< class Type > -void test_implicit_construction( Type a ) { - (void)a; -} +template< class Type > void test_implicit_construction(Type) {} template< class A, class B, class Type, class Are_implicit_interoperable > -class Implicit_interoperability_test { +class Implicit_test_implicit_interoperable { public: void operator()() { - // test implicit construction + // enforce implicit construction from A/B to Type // Results in 'no matching function for call to...' compile error, if type Type - // is not implicit constructable from A and B (which is part of the concept) + // is not implicit constructable from A and B (which is part of the concept) test_implicit_construction(A(1)); test_implicit_construction(B(2)); @@ -185,88 +295,87 @@ class Implicit_interoperability_test { }; template< class A, class B, class Type > -class Implicit_interoperability_test { +class Implicit_test_implicit_interoperable { public: void operator()() {} }; template< class A, class B, class Type > -void interoperability_test_one_way() { - typedef CGAL::Coercion_traits< A, B > CT; - - assert((::boost::is_same< typename CT::Are_implicit_interoperable, - CGAL::Tag_true - >::value)); - assert((::boost::is_same< typename CT::Type, Type >::value)); +void test_implicit_interoperable_one_way() { - // Implicit_interoperability_test - Implicit_interoperability_test< A, B, Type, - typename CT::Are_implicit_interoperable >()(); - - Test_integral_division< A, B, Type, - typename CGAL::Algebraic_structure_traits::Integral_division >()(); - - Test_gcd< A, B, Type, - typename CGAL::Algebraic_structure_traits::Gcd >()(); + typedef CGAL::Coercion_traits CT; + typedef typename CT::Type C; + typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; - Test_div_mod< A, B, Type, - typename CGAL::Algebraic_structure_traits::Div_mod >()(); - - Test_div< A, B, Type, - typename CGAL::Algebraic_structure_traits::Div >()(); - Test_mod< A, B, Type, - typename CGAL::Algebraic_structure_traits::Mod >()(); - Test_compare< A, B, Type, - typename CGAL::Real_embeddable_traits::Compare >()(); + BOOST_STATIC_ASSERT( + (::boost::is_same::value)); + assert((::boost::is_same::value)); + + typename CGAL::Real_embeddable_traits::Is_real_embeddable is_real_embeddable; + test_implicit_interoperable_for_real_embeddable(is_real_embeddable); + typename CGAL::Algebraic_structure_traits::Algebraic_category category; + test_implicit_interoperable_for_algebraic_structure(category); } -template< class A, class B, class Type > -void interoperability_test() { - interoperability_test_one_way< A, B, Type >(); - interoperability_test_one_way< B, A, Type >(); -} -template< class FROM, class TO > -void direct_interoperability_from_to_test() { - interoperability_test< FROM, TO, TO >(); -} +// test for explicit interoperable types template -void coercion_traits_test_one_way(){ - typedef CGAL::Coercion_traits CT; - { - typedef typename CT::Type Type; - typename CT::Cast cast; - assert((::boost::is_same< - typename CT::Are_explicit_interoperable, - CGAL::Tag_true - >::value)); - assert((::boost::is_same::value)); - A a(3); - B b(3); - RT rt(3); - assert(rt==cast(a)); - assert(rt==cast(b)); - } -} - -template -void coercion_traits_test(){ - coercion_traits_test_one_way(); - coercion_traits_test_one_way(); - - // TODO: Is this here OK? - if((::boost::is_same< typename CGAL::Coercion_traits< A, B >::Are_implicit_interoperable, - CGAL::Tag_true - >::value)) { - interoperability_test< A, B, Type >(); - } +void test_explicit_interoperable_one_way(){ + typedef CGAL::Coercion_traits CT; + typedef typename CT::Type Type; -} -template -void direct_coercion_from_to_test(){ - coercion_traits_test(); + assert( + (::boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + assert((::boost::is_same::value)); + + typename CT::Cast cast; + A a(3); + B b(3); + RT rt(3); + assert(rt==cast(a)); + assert(rt==cast(b)); + + // Binary Functors should support explicit interoperable types + typedef typename CGAL::Algebraic_structure_traits::Integral_division Idiv; + Test_integral_division< A, B, Type, Idiv>()(); + typedef typename CGAL::Algebraic_structure_traits::Gcd Gcd; + Test_gcd< A, B, Type, Gcd >()(); + typedef typename CGAL::Algebraic_structure_traits::Div_mod Div_mod; + Test_div_mod< A, B, Type, Div_mod>()(); + typedef typename CGAL::Algebraic_structure_traits::Div Div; + Test_div< A, B, Type, Div >()(); + typedef typename CGAL::Algebraic_structure_traits::Mod Mod; + Test_mod< A, B, Type, Mod >()(); + typedef typename CGAL::Real_embeddable_traits::Compare Compare; + Test_compare< A, B, Type, Compare >()(); } }// namespace INTERN_COERCION_TRAITS + +// this test implicit interoperable +template< class A, class B, class Type > +void test_implicit_interoperable() { + INTERN_COERCION_TRAITS::test_implicit_interoperable_one_way< A, B, Type >(); + INTERN_COERCION_TRAITS::test_implicit_interoperable_one_way< B, A, Type >(); + INTERN_COERCION_TRAITS::test_explicit_interoperable_one_way(); + INTERN_COERCION_TRAITS::test_explicit_interoperable_one_way(); +} + +template< class FROM, class TO > +void test_implicit_interoperable_from_to() { + test_implicit_interoperable< FROM, TO, TO >(); +} + +// this is testing explicit interoperability only +template +void test_explicit_interoperable(){ + INTERN_COERCION_TRAITS::test_explicit_interoperable_one_way(); + INTERN_COERCION_TRAITS::test_explicit_interoperable_one_way(); +} + +template +void test_explicit_interoperable_from_to(){ + test_explicit_interoperable(); +} CGAL_END_NAMESPACE diff --git a/Number_types/test/Number_types/Coercion_traits.cpp b/Number_types/test/Number_types/Coercion_traits.cpp index d2aed613913..905d500a76f 100644 --- a/Number_types/test/Number_types/Coercion_traits.cpp +++ b/Number_types/test/Number_types/Coercion_traits.cpp @@ -36,7 +36,7 @@ void test_coercion_from_to(CGAL::Null_tag, CGAL::Null_tag){}; template void test_coercion_from_to(A, CGAL::Null_tag){}; template void test_coercion_from_to(CGAL::Null_tag, B){}; template void test_coercion_from_to(A, B){ - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); }; template @@ -120,38 +120,38 @@ void check_type_coercion_at(){ template void AT_coercion_test_for_cgal_types_int(){ typedef typename AT::Integer Integer; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); // Quotient typedef CGAL::Quotient Quotient; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_1; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_2n; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_2d; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); } template @@ -162,11 +162,11 @@ void AT_coercion_test_for_cgal_types_rat(){ typedef typename AT::Integer Integer; typedef typename AT::Rational Rational; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_1; @@ -174,36 +174,36 @@ void AT_coercion_test_for_cgal_types_rat(){ typedef CGAL::Sqrt_extension Extn_2d; typedef CGAL::Sqrt_extension Extn_rat_int; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); -// CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); +// CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_rat_1; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); -// CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); -// CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); +// CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); +// CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_rat_2n; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); -// CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); +// CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); typedef CGAL::Sqrt_extension Extn_rat_2d; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); -// CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); +// CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); } @@ -224,27 +224,27 @@ void AT_coercion_test_for_cgal_types_fws(){ typedef CGAL::Sqrt_extension Extn_rat_2n; typedef CGAL::Sqrt_extension Extn_rat_2d; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); + CGAL::test_explicit_interoperable_from_to(); // direct casts // Integer; - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); // Rational - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); // Interval - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable_from_to(); } // TODO: We have no NT compactified, Matrix, Vector, etc. yet @@ -389,44 +389,44 @@ void test_vector_d(){ int main(){ - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); + CGAL::test_implicit_interoperable_from_to(); // test_compactified(); // test_tendency(); diff --git a/Number_types/test/Number_types/Sqrt_extension_CORE_arithmetic_kernel.cpp b/Number_types/test/Number_types/Sqrt_extension_CORE_arithmetic_kernel.cpp index 78c246f90d0..96a13cbbfe9 100644 --- a/Number_types/test/Number_types/Sqrt_extension_CORE_arithmetic_kernel.cpp +++ b/Number_types/test/Number_types/Sqrt_extension_CORE_arithmetic_kernel.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include @@ -372,7 +372,8 @@ void general_test(){ EXT1 c1((NT)7 ,(NT)-11,(ROOT)17); CGAL::test_algebraic_structure(a1,b1,c1); CGAL::test_real_embeddable(); - CGAL::test_implicit_interoperable(); + CGAL::test_implicit_interoperable(); + CGAL::test_implicit_interoperable(); typedef CGAL::Sqrt_extension EXT2; EXT2 a2(b1 ,a1 ,(ROOT)19); @@ -720,7 +721,7 @@ void sqrt_extension_test(){ int main(){ #ifdef CGAL_USE_CORE sqrt_extension_test(); -#endif // CGAL_USE_CORE +#endif // CGAL_USE_CORE return 0; } diff --git a/Number_types/test/Number_types/Sqrt_extension_LEDA_arithmetic_kernel.cpp b/Number_types/test/Number_types/Sqrt_extension_LEDA_arithmetic_kernel.cpp index 3b5b148a9e5..ac4e193f15e 100644 --- a/Number_types/test/Number_types/Sqrt_extension_LEDA_arithmetic_kernel.cpp +++ b/Number_types/test/Number_types/Sqrt_extension_LEDA_arithmetic_kernel.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include @@ -372,7 +372,8 @@ void general_test(){ EXT1 c1((NT)7 ,(NT)-11,(ROOT)17); CGAL::test_algebraic_structure(a1,b1,c1); CGAL::test_real_embeddable(); - CGAL::test_implicit_interoperable(); + CGAL::test_implicit_interoperable(); + CGAL::test_implicit_interoperable(); typedef CGAL::Sqrt_extension EXT2; EXT2 a2(b1 ,a1 ,(ROOT)19); diff --git a/Polynomial/test/Polynomial/Coercion_traits.cpp b/Polynomial/test/Polynomial/Coercion_traits.cpp index 8b7490f601c..be5535db554 100644 --- a/Polynomial/test/Polynomial/Coercion_traits.cpp +++ b/Polynomial/test/Polynomial/Coercion_traits.cpp @@ -12,7 +12,7 @@ #include template void test_coercion_from_to(A, B){ - CGAL::INTERN_COERCION_TRAITS::direct_coercion_from_to_test(); + CGAL::test_explicit_interoperable(); }; template