Clean some AG2 tests : Filtered_exact does not exist anymore

This commit is contained in:
Mael Rouxel-Labbé 2020-03-10 15:18:55 +01:00
parent 0729d1b0d1
commit 5c694722a9
3 changed files with 19 additions and 158 deletions

View File

@ -4,76 +4,31 @@
#include <fstream>
#include <cassert>
#define DONT_USE_FILTERED_EXACT
// choose number type
#include <CGAL/MP_Float.h>
#ifndef DONT_USE_FILTERED_EXACT
# include <CGAL/Filtered_exact.h>
#endif
typedef double inexact_type;
typedef CGAL::MP_Float exact_type;
#ifndef DONT_USE_FILTERED_EXACT
typedef CGAL::Filtered_exact<inexact_type,exact_type> number_t;
#endif
#include <CGAL/Simple_cartesian.h>
#ifndef DONT_USE_FILTERED_EXACT
typedef CGAL::Simple_cartesian<number_t> Kernel;
#endif
typedef CGAL::Integral_domain_without_division_tag Method_tag;
#include "./include/test.h"
typedef CGAL::Simple_cartesian<inexact_type> CK;
typedef CGAL::Simple_cartesian<exact_type> EK;
int main()
{
#ifndef DONT_USE_FILTERED_EXACT
{
std::ifstream ifs_algo("./data/algo.dat");
std::ifstream ifs_algo("./data/algo.dat");
assert( ifs_algo );
assert( ifs_algo );
std::cout << "testing the Apollonius graph class..." << std::flush;
bool algo_ok =
CGAL::test_algo<Kernel,Method_tag,std::ifstream>(ifs_algo);
assert( algo_ok );
std::cout << " done!" << std::endl;
ifs_algo.close();
std::cout << std::endl;
}
#endif
//------------------------------------------------------------------------
{
std::ifstream ifs_algo("./data/algo.dat");
assert( ifs_algo );
std::cout << "testing the Apollonius graph class"
<< " with filtered traits..." << std::flush;
bool algo_ok =
CGAL::test_filtered_traits_algo<CK,Method_tag,EK,Method_tag,
std::ifstream>(ifs_algo);
assert( algo_ok );
std::cout << " done!" << std::endl;
ifs_algo.close();
std::cout << std::endl;
}
std::cout << "testing the Apollonius graph class" << " with filtered traits..." << std::flush;
bool algo_ok = CGAL::test_filtered_traits_algo<CK,Method_tag,EK,Method_tag,std::ifstream>(ifs_algo);
assert( algo_ok );
std::cout << " done!" << std::endl;
return 0;
}

View File

@ -4,79 +4,31 @@
#include <fstream>
#include <cassert>
#define DNOT_USE_FILTERED_EXACT
// choose number type
#include <CGAL/MP_Float.h>
#ifndef DNOT_USE_FILTERED_EXACT
# include <CGAL/Filtered_exact.h>
#endif
typedef double inexact_type;
typedef CGAL::MP_Float exact_type;
#ifndef DNOT_USE_FILTERED_EXACT
typedef CGAL::Filtered_exact<inexact_type,exact_type> number_t;
#endif
#include <CGAL/Simple_cartesian.h>
#ifndef DNOT_USE_FILTERED_EXACT
typedef CGAL::Simple_cartesian<number_t> K;
#endif
typedef CGAL::Integral_domain_without_division_tag Method_tag;
#include "./include/test.h"
typedef CGAL::Simple_cartesian<inexact_type> CK;
typedef CGAL::Simple_cartesian<exact_type> EK;
int main()
{
#ifndef DNOT_USE_FILTERED_EXACT
{
std::ifstream ifs_hierarchy("./data/hierarchy.dat");
std::ifstream ifs_hierarchy("./data/hierarchy.dat");
assert( ifs_hierarchy );
assert( ifs_hierarchy );
std::cout << "testing the Apollonius graph hierarchy class" << " with filtered traits..." << std::flush;
bool hierarchy_ok = CGAL::test_filtered_traits_hierarchy_algo<CK,Method_tag,EK,Method_tag,std::ifstream>(ifs_hierarchy);
std::cout << "testing the Apollonius graph hierarchy class..."
<< std::flush;
bool hierarchy_ok =
CGAL::test_hierarchy_algo<Kernel,Method_tag,
std::ifstream>(ifs_hierarchy);
assert( hierarchy_ok );
std::cout << " done!" << std::endl;
ifs_hierarchy.close();
std::cout << std::endl;
}
#endif
//------------------------------------------------------------------------
{
std::ifstream ifs_hierarchy("./data/hierarchy.dat");
assert( ifs_hierarchy );
std::cout << "testing the Apollonius graph hierarchy class"
<< " with filtered traits..." << std::flush;
bool hierarchy_ok =
CGAL::test_filtered_traits_hierarchy_algo<CK,Method_tag,EK,
Method_tag,std::ifstream>(ifs_hierarchy);
assert( hierarchy_ok );
std::cout << " done!" << std::endl;
ifs_hierarchy.close();
std::cout << std::endl;
}
assert( hierarchy_ok );
std::cout << " done!" << std::endl;
return 0;
}

View File

@ -2,79 +2,33 @@
#include <fstream>
#include <cassert>
#define DONT_USE_FILTERED_EXACT
// choose number type
#include <CGAL/MP_Float.h>
#ifndef DONT_USE_FILTERED_EXACT
# include <CGAL/Filtered_exact.h>
#endif
typedef double inexact_type;
typedef CGAL::MP_Float exact_type;
#ifndef DONT_USE_FILTERED_EXACT
typedef CGAL::Filtered_exact<inexact_type,exact_type> number_t;
#endif
#include <CGAL/Simple_cartesian.h>
#ifndef DONT_USE_FILTERED_EXACT
typedef CGAL::Simple_cartesian<number_t> Kernel;
#endif
typedef CGAL::Integral_domain_without_division_tag Method_tag;
#include "./include/test.h"
typedef CGAL::Simple_cartesian<double> CK;
typedef CGAL::Simple_cartesian<CGAL::MP_Float> EK;
int main()
{
#ifndef DONT_USE_FILTERED_EXACT
{
std::ifstream ifs_traits("./data/traits.dat");
std::ifstream ifs_traits("./data/traits.dat");
assert( ifs_traits );
assert( ifs_traits );
std::cout << "testing the filtered traits class..." << std::flush;
// bool is_ok =
// CGAL::test_traits<Kernel,CGAL::Integral_domain_without_division_tag,std::ifstream>(ifs_traits);
CGAL::Filtered_traits_tester<CK,Method_tag,EK,Method_tag> test_traits;
bool traits_ok = test_traits();
assert( traits_ok );
std::cout << "testing the traits class..." << std::flush;
CGAL::Traits_tester<Kernel,Method_tag> test_traits;
bool traits_ok = test_traits();
assert( traits_ok );
std::cout << " done!" << std::endl;
ifs_traits.close();
std::cout << std::endl;
}
#endif
//------------------------------------------------------------------------
{
std::ifstream ifs_traits("./data/traits.dat");
assert( ifs_traits );
std::cout << "testing the filtered traits class..." << std::flush;
CGAL::Filtered_traits_tester<CK,Method_tag,EK,Method_tag> test_traits;
bool traits_ok = test_traits();
assert( traits_ok );
std::cout << " done!" << std::endl;
ifs_traits.close();
std::cout << std::endl;
}
std::cout << " done!" << std::endl;
return 0;
}