- Add a test program for the Lazy_kernel.

It's beginning to work.
This commit is contained in:
Sylvain Pion 2006-08-03 11:31:40 +00:00
parent a9ef419c31
commit fc39b60aa7
2 changed files with 101 additions and 9 deletions

View File

@ -0,0 +1,88 @@
// Copyright (c) 2001,2002 Utrecht University (The Netherlands),
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with CGAL.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s) : Sylvain Pion
#include <CGAL/Lazy_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Quotient.h>
#include <cassert>
#include "CGAL/Precise_numbers.h"
#include "CGAL/_test_io.h"
#include "CGAL/_test_2.C"
#include "CGAL/_test_3.C"
#include "CGAL/_test_new_2.h"
#include "CGAL/_test_new_3.h"
#include "CGAL/_test_fct_points_implicit_sphere.h"
#include "CGAL/_test_orientation_and_bounded_side.h"
#include "CGAL/_test_fct_constructions_2.h"
#include "CGAL/_test_fct_constructions_3.h"
#include "CGAL/_test_fct_point_3.h"
#include "CGAL/_test_fct_coplanar_3.h"
#include "CGAL/_test_cls_iso_cuboid_3.h"
#include "CGAL/_test_angle.h"
#include "CGAL/_test_mf_plane_3_to_2d.h"
int
main()
{
typedef CGAL::Cartesian<CGAL::Quotient<Precise_integer> > EK;
typedef CGAL::Lazy_kernel<EK> Cls;
std::cout << "Testing 2d with Lazy_kernel<Cartesian<Quotient<Precise_integer>>> :";
std::cout << std::endl;
_test_2( Cls() );
std::cout << "Testing 3d with Lazy_kernel<Cartesian<Quotient<Precise_integer>>> :";
std::cout << std::endl;
_test_3( Cls() );
std::cout << "Testing new 2d with Lazy_kernel<Cartesian<Quotient<Precise_integer>>> :";
std::cout << std::endl;
test_new_2( Cls() );
_test_cls_new_2( Cls() );
std::cout << "Testing new 3d with Lazy_kernel<Cartesian<Quotient<Precise_integer>>> :";
std::cout << std::endl;
test_new_3( Cls() );
#if 0
std::cout << "Testing new parts with Lazy_kernel<Cartesian<Quotient<Precise_integer>>> :";
std::cout << std::endl;
_test_orientation_and_bounded_side( Cls() );
_test_fct_points_implicit_sphere( Cls() );
_test_fct_constructions_2( Cls() );
_test_fct_constructions_3( Cls() );
_test_fct_point_3( Cls() );
_test_fct_coplanar_3( Cls() );
_test_cls_iso_cuboid_3( Cls() );
_test_angle( Cls() );
std::cout << "Testing 3d-2d with Lazy_kernel<Cartesian<Quotient<Precise_integer>>> :";
std::cout << std::endl;
_test_mf_plane_3_to_2d( Cls() );
#endif
std::cout << "All tests done" << std::endl;
return 0;
}

View File

@ -14,21 +14,16 @@ include $(CGAL_MAKEFILE)
#---------------------------------------------------------------------#
CXXFLAGS = \
-Iinclude \
-I../../include \
-I../../../Configuration/include \
-I../../../Homogeneous_kernel/include \
-I../../../Cartesian_kernel/include \
-I../../../Number_types/include \
-I../../../Distance_2/include \
-I../../../Intersections_2/include \
-I../../../Intersections_3/include \
-I../../../Filtered_kernel/include \
-I../../../Kernel_d/include \
-I../../../Cartesian_kernel/include \
-I../../../Homogeneous_kernel/include \
$(TESTSUITE_CXXFLAGS) \
$(EXTRA_FLAGS) \
$(CGAL_CXXFLAGS) \
-Iinclude \
$(LONG_NAME_PROBLEM_CXXFLAGS)
$(LONG_NAME_PROBLEM_CXXFLAGS) # -g # -DCGAL_CHECK_EXPENSIVE
#---------------------------------------------------------------------#
# linker flags
@ -54,6 +49,7 @@ all: \
Filtered_homogeneous$(EXE_EXT) \
Homogeneous$(EXE_EXT) \
Kernel_checker$(EXE_EXT) \
Lazy_kernel$(EXE_EXT) \
Simple_cartesian$(EXE_EXT) \
Simple_homogeneous$(EXE_EXT) \
test_kernel_archetype_2$(EXE_EXT) \
@ -78,6 +74,9 @@ Homogeneous$(EXE_EXT): Homogeneous$(OBJ_EXT)
Kernel_checker$(EXE_EXT): Kernel_checker$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Kernel_checker Kernel_checker$(OBJ_EXT) $(LDFLAGS)
Lazy_kernel$(EXE_EXT): Lazy_kernel$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Lazy_kernel Lazy_kernel$(OBJ_EXT) $(LDFLAGS)
Simple_cartesian$(EXE_EXT): Simple_cartesian$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Simple_cartesian Simple_cartesian$(OBJ_EXT) $(LDFLAGS)
@ -100,6 +99,7 @@ clean: \
Filtered_homogeneous.clean \
Homogeneous.clean \
Kernel_checker.clean \
Lazy_kernel.clean \
Simple_cartesian.clean \
Simple_homogeneous.clean \
test_kernel_archetype_2.clean \
@ -113,3 +113,7 @@ clean: \
.C$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
.cpp$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<