fix warnings

This commit is contained in:
Sébastien Loriot 2015-07-16 14:44:56 +02:00
parent 84d82c3a8e
commit 3e037f0f15
7 changed files with 53 additions and 48 deletions

View File

@ -49,17 +49,17 @@ int main(int, char**)
// missing construction from segments and random init
CGAL_TEST((N1*N1) == N1);
CGAL_TEST((N1*!N1) == EMPTY);
CGAL_TEST((N1*N1) == N1){}
CGAL_TEST((N1*!N1) == EMPTY){}
CGAL_NEF_TRACEV(N1);
CGAL_NEF_TRACEV(!N1);
CGAL_NEF_TRACEV(N1+!N1);
CGAL_TEST((N1+!N1) == SPHERE);
CGAL_TEST((N1^N2) == ((N1-N2)+(N2-N1))); // xor reformulation
CGAL_TEST((N1+!N1) == SPHERE){}
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) ^ (!N1+!N2));
CGAL_TEST( (!(N1*N2)) == (!N1+!N2) ); // deMorgan
CGAL_TEST( (!(N1*N2)) == (!N1+!N2) ){} // deMorgan
#if 1
Nef_polyhedron N3 = N1.intersection(N2);
/* 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 N5(C,C+3,0.5);
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(N3 < N1 && N3 < N2){}
CGAL_TEST(N3 <= N1 && N3 <= N2){}
CGAL_TEST(N1 > N3 && N2 > N3){}
CGAL_TEST(N1 >= N3 && N2 >= N3){}
SVertex_const_handle v;
SHalfedge_const_handle e;
SFace_const_handle f;
Object_handle h;
h = N3.locate(p1); // on y-axis
CGAL_TEST( CGAL::assign(v,h) );
CGAL_TEST( v->point() == p1 && !v->mark() );
CGAL_TEST( CGAL::assign(v,h) ){}
CGAL_TEST( v->point() == p1 && !v->mark() ){}
h = N3.locate(p2);
CGAL_TEST( CGAL::assign(e,h) );
CGAL_TEST( e->circle() == c3 && !e->mark() );
CGAL_TEST( CGAL::assign(e,h) ){}
CGAL_TEST( e->circle() == c3 && !e->mark() ){}
h = N3.locate(p3);
CGAL_TEST( CGAL::assign(f,h) );
CGAL_TEST( f->mark() );
CGAL_TEST( CGAL::assign(f,h) ){}
CGAL_TEST( f->mark() ){}
#endif
CGAL_TEST_END;
return 0;

View File

@ -25,29 +25,29 @@ int main()
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));
SCircle c0, c1(p,q), c2(1,1,1), c3(Plane(1,1,1,0));
CGAL_TEST(p.x() == NT(0));
CGAL_TEST(p.y() == NT(0));
CGAL_TEST(p.z() == NT(1));
CGAL_TEST(p.antipode().antipode()==p);
CGAL_TEST(p.antipode()!=p);
CGAL_TEST(p.x() == NT(0)){}
CGAL_TEST(p.y() == NT(0)){}
CGAL_TEST(p.z() == NT(1)){}
CGAL_TEST(p.antipode().antipode()==p){}
CGAL_TEST(p.antipode()!=p){}
CGAL_TEST(c1.opposite().opposite()==c1);
CGAL_TEST(c1.has_on(p)&&c1.has_on(q));
CGAL_TEST(c3.plane()==Plane(1,1,1,0));
CGAL_TEST(c1.opposite().opposite()==c1){}
CGAL_TEST(c1.has_on(p)&&c1.has_on(q)){}
CGAL_TEST(c3.plane()==Plane(1,1,1,0)){}
c1.split_at(p);
c1.split_at_xy_plane();
CGAL_TEST(s1.is_short());
CGAL_TEST(s2.is_long());
CGAL_TEST(s1.source()==p);
CGAL_TEST(s1.target()==q);
CGAL_TEST(s1.sphere_circle()==c1);
CGAL_TEST(s1.opposite().opposite()==s1);
CGAL_TEST(s1.complement().complement()==s1);
CGAL_TEST(SSegment(p,p,c1).is_degenerate());
CGAL_TEST(SSegment(p,p.antipode(),c1).is_halfcircle());
CGAL_TEST(s1.has_on(p));
CGAL_TEST(SSegment(p,p.antipode(),c1).has_in_relative_interior(q));
CGAL_TEST(s1.is_short()){}
CGAL_TEST(s2.is_long()){}
CGAL_TEST(s1.source()==p){}
CGAL_TEST(s1.target()==q){}
CGAL_TEST(s1.sphere_circle()==c1){}
CGAL_TEST(s1.opposite().opposite()==s1){}
CGAL_TEST(s1.complement().complement()==s1){}
CGAL_TEST(SSegment(p,p,c1).is_degenerate()){}
CGAL_TEST(SSegment(p,p.antipode(),c1).is_halfcircle()){}
CGAL_TEST(s1.has_on(p)){}
CGAL_TEST(SSegment(p,p.antipode(),c1).has_in_relative_interior(q)){}
std::list<SSegment> L,Lp;
std::list<SSegment>::iterator it;

View File

@ -143,8 +143,8 @@ substitute_xy(
typedef typename CGAL::Coercion_traits< CGAL::Polynomial< NT >, NTX > CT;
typedef typename CT::Type Coercion;
typedef typename CGAL::Coercion_traits< NT, NTX > CTi;
typedef typename CT::Type Coercion_i;
// typedef typename CGAL::Coercion_traits< NT, NTX > CTi;
// typedef typename CT::Type Coercion_i;
typedef CGAL::Polynomial_traits_d < Coercion > PT_dc;
std::vector< Coercion > replacements;

View File

@ -10,7 +10,7 @@
#include <CGAL/Random.h>
#include <cmath>
#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);
typedef typename AK::Integer Integer;
typedef typename AK::Rational Rational;
typedef typename AK::Rational Rational;
CGAL_USE_TYPE(Rational);
typedef CGAL::Polynomial<Integer> Poly;
@ -41,7 +42,7 @@ void test_AK_2(){
typedef typename AK::Integer Integer;
typedef typename AK::Rational Rational;
CGAL_USE_TYPE(Integer);
typedef CGAL::Polynomial<Rational> Poly;
typedef CGAL::Polynomial_traits_d<Poly> PT;
@ -82,7 +83,7 @@ void test_AK_5(){
typedef typename AK::Integer Integer;
typedef typename AK::Rational Rational;
CGAL_USE_TYPE(Integer);
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::Rational Rational;
CGAL_USE_TYPE(Integer);
CGAL_USE_TYPE(Rational);
// Enforce IEEE double precision and to nearest before
// using modular arithmetic

View File

@ -40,12 +40,15 @@
#include <CGAL/LEDA_arithmetic_kernel.h>
#include <CGAL/Sqrt_extension.h>
#include <CGAL/Polynomial.h>
#include <CGAL/use.h>
#include <cassert>
template<class AT>
void test_modular_gcd_utils() {
CGAL_SNAP_ARITHMETIC_KERNEL_TYPEDEFS(AT);
CGAL_USE_TYPE(Rational);
CGAL_USE_TYPE(Field_with_sqrt);
CGAL::Random my_random(4711);
::CGAL::set_pretty_mode(std::cout);

View File

@ -638,10 +638,10 @@ void trivariate_polynomial_test() {
typedef typename AT::Integer Integer;
typedef typename AT::Rational Rational;
typedef CGAL::Sqrt_extension<Integer ,Integer> int_EXT_1;
typedef CGAL::Sqrt_extension<int_EXT_1,Integer> int_EXT_2;
typedef CGAL::Sqrt_extension<Rational ,Integer> rat_EXT_1;
typedef CGAL::Sqrt_extension<rat_EXT_1,Integer> rat_EXT_2;
// typedef CGAL::Sqrt_extension<Integer ,Integer> int_EXT_1;
// typedef CGAL::Sqrt_extension<int_EXT_1,Integer> int_EXT_2;
// typedef CGAL::Sqrt_extension<Rational ,Integer> rat_EXT_1;
// typedef CGAL::Sqrt_extension<rat_EXT_1,Integer> rat_EXT_2;
{
// testing trivariate polynomials with integer coefficients
typedef CGAL::Polynomial<Integer> int_POLY_1;

View File

@ -1024,9 +1024,9 @@ void test_AT(){
exact_tests<Integer>();
}{
typedef typename AT::Rational Rational;
typedef typename CGAL::Polynomial<Rational> Polynomial;
typedef CGAL::Euclidean_ring_tag Tag;
typedef CGAL::Tag_true Is_exact;
// typedef typename CGAL::Polynomial<Rational> Polynomial;
// typedef CGAL::Euclidean_ring_tag Tag;
// typedef CGAL::Tag_true Is_exact;
//can't use this test for Polynomials
//CGAL::test_algebraic_structure<Polynomial,Tag, Is_exact>();
basic_tests<Rational>();