New test for traits class.

This commit is contained in:
Shai Hirsch 2001-07-03 12:55:55 +00:00
parent fbedfe0495
commit 4f30135ad3
4 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,33 @@
#include <CGAL/basic.h>
#include <iostream>
// Making sure test doesn't fail if LEDA is not installed
#if ! defined(CGAL_USE_LEDA)
int main(int argc, char* argv[])
{
std::cout << "A try to run test with LEDA traits but LEDA is not installed.";
std::cout << std::endl;
std::cout << "Test is not performed.";
std::cout << std::endl;
return 0;
}
#else
#include <CGAL/leda_rational.h>
#include <CGAL/Arr_leda_polyline_traits.h>
#include <Polyline_traits_test.h>
typedef CGAL::Arr_leda_polyline_traits<> Traits;
int main( int argc, char** argv ){
Polyline_traits_test< Traits, leda_rational > test_obj( argc, argv );
if (test_obj.start())
return (0); // SUCCESS
else
return (1); // FAILURE
}
#endif // ! defined(CGAL_USE_LEDA) ...

View File

@ -0,0 +1,34 @@
#include <CGAL/basic.h>
#include <iostream>
// Making sure test doesn't fail if LEDA is not installed
#if ! defined(CGAL_USE_LEDA)
int main(int argc, char* argv[])
{
std::cout << "A try to run test with LEDA traits but LEDA is not installed.";
std::cout << std::endl;
std::cout << "Test is not performed.";
std::cout << std::endl;
return 0;
}
#else
#include <CGAL/Arr_leda_segment_exact_traits.h>
#include <CGAL/leda_rational.h>
#include <Segment_traits_test.h>
typedef leda_rational NT;
typedef CGAL::Arr_leda_segment_exact_traits Traits;
int main( int argc, char** argv ){
Segment_traits_test< Traits, leda_rational > test_obj( argc, argv );
if (test_obj.start())
return (0); // SUCCESS
else
return (1); // FAILURE
}
#endif // ! defined(CGAL_USE_LEDA) ...

View File

@ -0,0 +1,18 @@
#include <CGAL/Cartesian.h>
#include <CGAL/Arr_polyline_traits.h>
#include <Polyline_traits_test.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<int> NT;
typedef CGAL::Cartesian<NT> Rep;
typedef CGAL::Arr_polyline_traits<Rep> Traits;
int main( int argc, char** argv ){
Polyline_traits_test< Traits, NT > test_obj( argc, argv );
if (test_obj.start())
return (0); // SUCCESS
else
return (1); // FAILURE
}

View File

@ -0,0 +1,18 @@
#include <CGAL/Cartesian.h>
#include <CGAL/Arr_segment_exact_traits.h>
#include <CGAL/Quotient.h>
#include <Segment_traits_test.h>
typedef CGAL::Quotient<int> NT;
typedef CGAL::Cartesian<NT> R;
typedef CGAL::Arr_segment_exact_traits<R> Traits;
int main( int argc, char** argv ){
Segment_traits_test< Traits, NT > test_obj( argc, argv );
if (test_obj.start())
return (0); // SUCCESS
else
return (1); // FAILURE
}