mirror of https://github.com/CGAL/cgal
test of defaults
This commit is contained in:
parent
1310698f89
commit
2bb6c10021
|
|
@ -98,6 +98,9 @@ Algebraic_foundations/include/CGAL/Rational_traits.h -text
|
|||
Algebraic_foundations/include/CGAL/Real_embeddable_traits.h -text
|
||||
Algebraic_foundations/include/CGAL/utils.h -text
|
||||
Algebraic_foundations/include/CGAL/utils_classes.h -text
|
||||
Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.C -text
|
||||
Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.C -text
|
||||
Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.C -text
|
||||
Algebraic_kernel_GBRS/config/support/S25-MPFI -text
|
||||
Algebraic_kernel_GBRS/config/support/S27-RS -text
|
||||
Algebraic_kernel_GBRS/config/support/test_MPFI.C -text
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Algebraic_structure_traits.h>
|
||||
#include <CGAL/Testsuite/assert.h>
|
||||
|
||||
|
||||
#define CGAL_IS_AST_NULL_FUNCTOR(NAME) \
|
||||
{ \
|
||||
typedef AST::NAME NAME; \
|
||||
BOOST_STATIC_ASSERT( \
|
||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
}
|
||||
|
||||
int main(){
|
||||
typedef CGAL::Algebraic_structure_traits<void> AST;
|
||||
|
||||
typedef AST::Algebraic_structure Algebraic_structure;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<void,Algebraic_structure>::value));
|
||||
|
||||
typedef AST::Algebraic_structure_tag Algebraic_structure_tag;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<CGAL::Null_tag,Algebraic_structure_tag>::value));
|
||||
|
||||
typedef AST::Is_exact Is_exact;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<CGAL::Null_tag,Is_exact>::value));
|
||||
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Integral_division);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Is_square);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Gcd);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Div_mod);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Div);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Mod);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Square);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Is_zero);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Is_one);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Sqrt);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Kth_root);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Root_of);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Coercion_traits.h>
|
||||
#include <CGAL/Testsuite/assert.h>
|
||||
int main(){
|
||||
{
|
||||
typedef CGAL::Coercion_traits<int,int> CT;
|
||||
BOOST_STATIC_ASSERT(
|
||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_test_assert( 5 == CT::Cast()(5));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
|
||||
BOOST_STATIC_ASSERT(
|
||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
BOOST_STATIC_ASSERT(
|
||||
( boost::is_same<CT::Cast,CGAL::Null_functor>::value));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Real_embeddable_traits.h>
|
||||
#include <CGAL/Testsuite/assert.h>
|
||||
|
||||
|
||||
#define CGAL_IS_RET_NULL_FUNCTOR(NAME) \
|
||||
{ \
|
||||
typedef RET::NAME NAME; \
|
||||
BOOST_STATIC_ASSERT( \
|
||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
}
|
||||
|
||||
int main(){
|
||||
typedef CGAL::Real_embeddable_traits<void> RET;
|
||||
|
||||
typedef RET::Real_embeddable Real_embeddable;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<void,Real_embeddable>::value));
|
||||
|
||||
typedef RET::Is_real_embeddable Is_real_embeddable;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
||||
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Abs);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Sign);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Is_finite);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Is_positive);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Is_negative);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Is_zero);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Compare);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(To_double);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(To_interval);
|
||||
}
|
||||
Loading…
Reference in New Issue