mirror of https://github.com/CGAL/cgal
fix warnings
This commit is contained in:
parent
84d82c3a8e
commit
3e037f0f15
|
|
@ -49,17 +49,17 @@ int main(int, char**)
|
||||||
|
|
||||||
// missing construction from segments and random init
|
// missing construction from segments and random init
|
||||||
|
|
||||||
CGAL_TEST((N1*N1) == N1);
|
CGAL_TEST((N1*N1) == N1){}
|
||||||
CGAL_TEST((N1*!N1) == EMPTY);
|
CGAL_TEST((N1*!N1) == EMPTY){}
|
||||||
CGAL_NEF_TRACEV(N1);
|
CGAL_NEF_TRACEV(N1);
|
||||||
CGAL_NEF_TRACEV(!N1);
|
CGAL_NEF_TRACEV(!N1);
|
||||||
CGAL_NEF_TRACEV(N1+!N1);
|
CGAL_NEF_TRACEV(N1+!N1);
|
||||||
CGAL_TEST((N1+!N1) == SPHERE);
|
CGAL_TEST((N1+!N1) == SPHERE){}
|
||||||
CGAL_TEST((N1^N2) == ((N1-N2)+(N2-N1))); // xor reformulation
|
CGAL_TEST((N1^N2) == ((N1-N2)+(N2-N1))){} // xor reformulation
|
||||||
|
|
||||||
CGAL_NEF_TRACEV((N1*N2)); CGAL_NEF_TRACEV(!(N1*N2)); CGAL_NEF_TRACEV((!N1+!N2));
|
CGAL_NEF_TRACEV((N1*N2)); CGAL_NEF_TRACEV(!(N1*N2)); CGAL_NEF_TRACEV((!N1+!N2));
|
||||||
CGAL_NEF_TRACEV(!(N1*N2) ^ (!N1+!N2));
|
CGAL_NEF_TRACEV(!(N1*N2) ^ (!N1+!N2));
|
||||||
CGAL_TEST( (!(N1*N2)) == (!N1+!N2) ); // deMorgan
|
CGAL_TEST( (!(N1*N2)) == (!N1+!N2) ){} // deMorgan
|
||||||
#if 1
|
#if 1
|
||||||
Nef_polyhedron N3 = N1.intersection(N2);
|
Nef_polyhedron N3 = N1.intersection(N2);
|
||||||
/* N3 is the two octants +++ and +-+ including the z-positive yz-halfplane
|
/* N3 is the two octants +++ and +-+ including the z-positive yz-halfplane
|
||||||
|
|
@ -68,24 +68,24 @@ int main(int, char**)
|
||||||
Nef_polyhedron N4(S,S+2,Nef_polyhedron::INCLUDED);
|
Nef_polyhedron N4(S,S+2,Nef_polyhedron::INCLUDED);
|
||||||
Nef_polyhedron N5(C,C+3,0.5);
|
Nef_polyhedron N5(C,C+3,0.5);
|
||||||
|
|
||||||
CGAL_TEST(N3 < N1 && N3 < N2);
|
CGAL_TEST(N3 < N1 && N3 < N2){}
|
||||||
CGAL_TEST(N3 <= N1 && N3 <= N2);
|
CGAL_TEST(N3 <= N1 && N3 <= N2){}
|
||||||
CGAL_TEST(N1 > N3 && N2 > N3);
|
CGAL_TEST(N1 > N3 && N2 > N3){}
|
||||||
CGAL_TEST(N1 >= N3 && N2 >= N3);
|
CGAL_TEST(N1 >= N3 && N2 >= N3){}
|
||||||
|
|
||||||
SVertex_const_handle v;
|
SVertex_const_handle v;
|
||||||
SHalfedge_const_handle e;
|
SHalfedge_const_handle e;
|
||||||
SFace_const_handle f;
|
SFace_const_handle f;
|
||||||
Object_handle h;
|
Object_handle h;
|
||||||
h = N3.locate(p1); // on y-axis
|
h = N3.locate(p1); // on y-axis
|
||||||
CGAL_TEST( CGAL::assign(v,h) );
|
CGAL_TEST( CGAL::assign(v,h) ){}
|
||||||
CGAL_TEST( v->point() == p1 && !v->mark() );
|
CGAL_TEST( v->point() == p1 && !v->mark() ){}
|
||||||
h = N3.locate(p2);
|
h = N3.locate(p2);
|
||||||
CGAL_TEST( CGAL::assign(e,h) );
|
CGAL_TEST( CGAL::assign(e,h) ){}
|
||||||
CGAL_TEST( e->circle() == c3 && !e->mark() );
|
CGAL_TEST( e->circle() == c3 && !e->mark() ){}
|
||||||
h = N3.locate(p3);
|
h = N3.locate(p3);
|
||||||
CGAL_TEST( CGAL::assign(f,h) );
|
CGAL_TEST( CGAL::assign(f,h) ){}
|
||||||
CGAL_TEST( f->mark() );
|
CGAL_TEST( f->mark() ){}
|
||||||
#endif
|
#endif
|
||||||
CGAL_TEST_END;
|
CGAL_TEST_END;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -25,29 +25,29 @@ int main()
|
||||||
SPoint p(0,0,1), q(1,1,0), r(1,-1,0), s(1,1,1);
|
SPoint p(0,0,1), q(1,1,0), r(1,-1,0), s(1,1,1);
|
||||||
SSegment s1(p,q), s2(p,r,false), s3(SPoint(0,-1,0),SPoint(-1,0,0));
|
SSegment s1(p,q), s2(p,r,false), s3(SPoint(0,-1,0),SPoint(-1,0,0));
|
||||||
SCircle c0, c1(p,q), c2(1,1,1), c3(Plane(1,1,1,0));
|
SCircle c0, c1(p,q), c2(1,1,1), c3(Plane(1,1,1,0));
|
||||||
CGAL_TEST(p.x() == NT(0));
|
CGAL_TEST(p.x() == NT(0)){}
|
||||||
CGAL_TEST(p.y() == NT(0));
|
CGAL_TEST(p.y() == NT(0)){}
|
||||||
CGAL_TEST(p.z() == NT(1));
|
CGAL_TEST(p.z() == NT(1)){}
|
||||||
CGAL_TEST(p.antipode().antipode()==p);
|
CGAL_TEST(p.antipode().antipode()==p){}
|
||||||
CGAL_TEST(p.antipode()!=p);
|
CGAL_TEST(p.antipode()!=p){}
|
||||||
|
|
||||||
CGAL_TEST(c1.opposite().opposite()==c1);
|
CGAL_TEST(c1.opposite().opposite()==c1){}
|
||||||
CGAL_TEST(c1.has_on(p)&&c1.has_on(q));
|
CGAL_TEST(c1.has_on(p)&&c1.has_on(q)){}
|
||||||
CGAL_TEST(c3.plane()==Plane(1,1,1,0));
|
CGAL_TEST(c3.plane()==Plane(1,1,1,0)){}
|
||||||
c1.split_at(p);
|
c1.split_at(p);
|
||||||
c1.split_at_xy_plane();
|
c1.split_at_xy_plane();
|
||||||
|
|
||||||
CGAL_TEST(s1.is_short());
|
CGAL_TEST(s1.is_short()){}
|
||||||
CGAL_TEST(s2.is_long());
|
CGAL_TEST(s2.is_long()){}
|
||||||
CGAL_TEST(s1.source()==p);
|
CGAL_TEST(s1.source()==p){}
|
||||||
CGAL_TEST(s1.target()==q);
|
CGAL_TEST(s1.target()==q){}
|
||||||
CGAL_TEST(s1.sphere_circle()==c1);
|
CGAL_TEST(s1.sphere_circle()==c1){}
|
||||||
CGAL_TEST(s1.opposite().opposite()==s1);
|
CGAL_TEST(s1.opposite().opposite()==s1){}
|
||||||
CGAL_TEST(s1.complement().complement()==s1);
|
CGAL_TEST(s1.complement().complement()==s1){}
|
||||||
CGAL_TEST(SSegment(p,p,c1).is_degenerate());
|
CGAL_TEST(SSegment(p,p,c1).is_degenerate()){}
|
||||||
CGAL_TEST(SSegment(p,p.antipode(),c1).is_halfcircle());
|
CGAL_TEST(SSegment(p,p.antipode(),c1).is_halfcircle()){}
|
||||||
CGAL_TEST(s1.has_on(p));
|
CGAL_TEST(s1.has_on(p)){}
|
||||||
CGAL_TEST(SSegment(p,p.antipode(),c1).has_in_relative_interior(q));
|
CGAL_TEST(SSegment(p,p.antipode(),c1).has_in_relative_interior(q)){}
|
||||||
|
|
||||||
std::list<SSegment> L,Lp;
|
std::list<SSegment> L,Lp;
|
||||||
std::list<SSegment>::iterator it;
|
std::list<SSegment>::iterator it;
|
||||||
|
|
|
||||||
|
|
@ -143,8 +143,8 @@ substitute_xy(
|
||||||
|
|
||||||
typedef typename CGAL::Coercion_traits< CGAL::Polynomial< NT >, NTX > CT;
|
typedef typename CGAL::Coercion_traits< CGAL::Polynomial< NT >, NTX > CT;
|
||||||
typedef typename CT::Type Coercion;
|
typedef typename CT::Type Coercion;
|
||||||
typedef typename CGAL::Coercion_traits< NT, NTX > CTi;
|
// typedef typename CGAL::Coercion_traits< NT, NTX > CTi;
|
||||||
typedef typename CT::Type Coercion_i;
|
// typedef typename CT::Type Coercion_i;
|
||||||
typedef CGAL::Polynomial_traits_d < Coercion > PT_dc;
|
typedef CGAL::Polynomial_traits_d < Coercion > PT_dc;
|
||||||
|
|
||||||
std::vector< Coercion > replacements;
|
std::vector< Coercion > replacements;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#include <CGAL/Random.h>
|
#include <CGAL/Random.h>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
#include <CGAL/Test/_test_polynomial_traits_d.h>
|
||||||
|
#include <CGAL/use.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,7 +21,8 @@ void test_AK_1(){
|
||||||
CGAL::set_pretty_mode(std::cerr);
|
CGAL::set_pretty_mode(std::cerr);
|
||||||
|
|
||||||
typedef typename AK::Integer Integer;
|
typedef typename AK::Integer Integer;
|
||||||
typedef typename AK::Rational Rational;
|
typedef typename AK::Rational Rational;
|
||||||
|
CGAL_USE_TYPE(Rational);
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Polynomial<Integer> Poly;
|
typedef CGAL::Polynomial<Integer> Poly;
|
||||||
|
|
@ -41,7 +42,7 @@ void test_AK_2(){
|
||||||
|
|
||||||
typedef typename AK::Integer Integer;
|
typedef typename AK::Integer Integer;
|
||||||
typedef typename AK::Rational Rational;
|
typedef typename AK::Rational Rational;
|
||||||
|
CGAL_USE_TYPE(Integer);
|
||||||
|
|
||||||
typedef CGAL::Polynomial<Rational> Poly;
|
typedef CGAL::Polynomial<Rational> Poly;
|
||||||
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
typedef CGAL::Polynomial_traits_d<Poly> PT;
|
||||||
|
|
@ -82,7 +83,7 @@ void test_AK_5(){
|
||||||
|
|
||||||
typedef typename AK::Integer Integer;
|
typedef typename AK::Integer Integer;
|
||||||
typedef typename AK::Rational Rational;
|
typedef typename AK::Rational Rational;
|
||||||
|
CGAL_USE_TYPE(Integer);
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Polynomial< CGAL::Sqrt_extension< Rational, Rational > > Poly;
|
typedef CGAL::Polynomial< CGAL::Sqrt_extension< Rational, Rational > > Poly;
|
||||||
|
|
@ -105,7 +106,8 @@ void test_AK_6(){
|
||||||
|
|
||||||
typedef typename AK::Integer Integer;
|
typedef typename AK::Integer Integer;
|
||||||
typedef typename AK::Rational Rational;
|
typedef typename AK::Rational Rational;
|
||||||
|
CGAL_USE_TYPE(Integer);
|
||||||
|
CGAL_USE_TYPE(Rational);
|
||||||
|
|
||||||
// Enforce IEEE double precision and to nearest before
|
// Enforce IEEE double precision and to nearest before
|
||||||
// using modular arithmetic
|
// using modular arithmetic
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,15 @@
|
||||||
#include <CGAL/LEDA_arithmetic_kernel.h>
|
#include <CGAL/LEDA_arithmetic_kernel.h>
|
||||||
#include <CGAL/Sqrt_extension.h>
|
#include <CGAL/Sqrt_extension.h>
|
||||||
#include <CGAL/Polynomial.h>
|
#include <CGAL/Polynomial.h>
|
||||||
|
#include <CGAL/use.h>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
template<class AT>
|
template<class AT>
|
||||||
void test_modular_gcd_utils() {
|
void test_modular_gcd_utils() {
|
||||||
CGAL_SNAP_ARITHMETIC_KERNEL_TYPEDEFS(AT);
|
CGAL_SNAP_ARITHMETIC_KERNEL_TYPEDEFS(AT);
|
||||||
|
CGAL_USE_TYPE(Rational);
|
||||||
|
CGAL_USE_TYPE(Field_with_sqrt);
|
||||||
|
|
||||||
CGAL::Random my_random(4711);
|
CGAL::Random my_random(4711);
|
||||||
::CGAL::set_pretty_mode(std::cout);
|
::CGAL::set_pretty_mode(std::cout);
|
||||||
|
|
|
||||||
|
|
@ -638,10 +638,10 @@ void trivariate_polynomial_test() {
|
||||||
typedef typename AT::Integer Integer;
|
typedef typename AT::Integer Integer;
|
||||||
typedef typename AT::Rational Rational;
|
typedef typename AT::Rational Rational;
|
||||||
|
|
||||||
typedef CGAL::Sqrt_extension<Integer ,Integer> int_EXT_1;
|
// typedef CGAL::Sqrt_extension<Integer ,Integer> int_EXT_1;
|
||||||
typedef CGAL::Sqrt_extension<int_EXT_1,Integer> int_EXT_2;
|
// typedef CGAL::Sqrt_extension<int_EXT_1,Integer> int_EXT_2;
|
||||||
typedef CGAL::Sqrt_extension<Rational ,Integer> rat_EXT_1;
|
// typedef CGAL::Sqrt_extension<Rational ,Integer> rat_EXT_1;
|
||||||
typedef CGAL::Sqrt_extension<rat_EXT_1,Integer> rat_EXT_2;
|
// typedef CGAL::Sqrt_extension<rat_EXT_1,Integer> rat_EXT_2;
|
||||||
{
|
{
|
||||||
// testing trivariate polynomials with integer coefficients
|
// testing trivariate polynomials with integer coefficients
|
||||||
typedef CGAL::Polynomial<Integer> int_POLY_1;
|
typedef CGAL::Polynomial<Integer> int_POLY_1;
|
||||||
|
|
|
||||||
|
|
@ -1024,9 +1024,9 @@ void test_AT(){
|
||||||
exact_tests<Integer>();
|
exact_tests<Integer>();
|
||||||
}{
|
}{
|
||||||
typedef typename AT::Rational Rational;
|
typedef typename AT::Rational Rational;
|
||||||
typedef typename CGAL::Polynomial<Rational> Polynomial;
|
// typedef typename CGAL::Polynomial<Rational> Polynomial;
|
||||||
typedef CGAL::Euclidean_ring_tag Tag;
|
// typedef CGAL::Euclidean_ring_tag Tag;
|
||||||
typedef CGAL::Tag_true Is_exact;
|
// typedef CGAL::Tag_true Is_exact;
|
||||||
//can't use this test for Polynomials
|
//can't use this test for Polynomials
|
||||||
//CGAL::test_algebraic_structure<Polynomial,Tag, Is_exact>();
|
//CGAL::test_algebraic_structure<Polynomial,Tag, Is_exact>();
|
||||||
basic_tests<Rational>();
|
basic_tests<Rational>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue