Deleted old MPFI test files.

This commit is contained in:
Luis Peñaranda 2006-10-03 11:43:13 +00:00
parent 50c2d2c574
commit 44484c0c19
5 changed files with 0 additions and 166 deletions

4
.gitattributes vendored
View File

@ -11,10 +11,6 @@ Algebraic_kernel_GBRS/include/CGAL/MpfiInterval.C -text
Algebraic_kernel_GBRS/include/CGAL/MpfiInterval.h -text
Algebraic_kernel_GBRS/test/MpfiInterval/Mpfi.C -text
Algebraic_kernel_GBRS/test/MpfiInterval/makefile -text
Algebraic_kernel_GBRS/test/MpfiInterval/test.C -text
Algebraic_kernel_GBRS/test/MpfiInterval/test_gmp.C -text
Algebraic_kernel_GBRS/test/MpfiInterval/test_int.C -text
Algebraic_kernel_GBRS/test/MpfiInterval/test_mpfr.C -text
Alpha_shapes_2/demo/Alpha_shapes_2/data/m30f.jpg -text svneol=unset#image/jpeg
Alpha_shapes_2/demo/Alpha_shapes_2/help/index.html svneol=native#text/html
Alpha_shapes_2/doc_tex/Alpha_shapes_2/alphashape.eps -text svneol=unset#application/postscript

View File

@ -1,41 +0,0 @@
#include <CGAL/Gmpz.h>
#include <mpfr.h>
#include <CGAL/MpfiInterval.h>
void test_intervals () {
CGAL::MpfiInterval i1 (7);
CGAL::MpfiInterval i2 (9);
std::cout << "i1 = " << i1 << std::endl;
std::cout << "i2 = " << i2 << std::endl;
std::cout << "i1==i2: " << (i1==i2) << std::endl;
std::cout << "i1!=i2: " << (i1!=i2) << std::endl;
std::cout << "i1<i2: " << (i1<i2) << std::endl;
std::cout << "i1>i2: " << (i1>i2) << std::endl;
std::cout << "i1<=i2: " << (i1<=i2) << std::endl;
std::cout << "i1>=i2: " << (i1>=i2) << std::endl;
i2 = 1 + i1;
std::cout << "(int)1 + i1 =\t" << i2 << std::endl;
std::cout << "1+i1 == 8? : " << (i2 == 8) << std::endl;
std::cout << "1+i1 != 8? : " << (i2 != 8) << std::endl;
std::cout << "1+i1 < 8? : " << (i2 < 8) << std::endl;
std::cout << "1+i1 > 8? : " << (i2 > 8) << std::endl;
std::cout << "1+i1 <= 8? : " << (i2 <= 8) << std::endl;
std::cout << "1+i1 >= 8? : " << (i2 >= 8) << std::endl;
mpfr_t x;
mpfr_init (x);
mpfr_set_si (x, 1, GMP_RNDN);
i2 = x + i1;
std::cout << "(mpfr_t)1 + i1 =\t" << i2 << std::endl;
mpz_t y;
mpz_init_set_si (y, 1);
i2 = y + i1;
std::cout << "(mpz_t)1 + i1 =\t" << i2 << std::endl;
CGAL::Gmpz z(1);
i2 = z + i1;
std::cout << "(Gmpz)1 + i1 =\t" << i2 << std::endl;
}
int main () {
test_intervals ();
return 0;
}

View File

@ -1,43 +0,0 @@
#include <CGAL/Gmpz.h>
#include <CGAL/Gmpq.h>
#include <CGAL/MpfiInterval.h>
// you can use CGAL::Gmpz and CGAL::Gmpq as T
template <class T>
void test_class () {
T one (1);
T two (2);
CGAL::MpfiInterval interval1 (1);
CGAL::MpfiInterval interval2 (0.5, 1.5);
std::cout << "interval1 = " << interval1 << "\tis point: " << interval1.is_point () << std::endl;
std::cout << "interval2 = " << interval2 << "\tis point: " << interval2.is_point () << std::endl;
std::cout << "interval1==one: " << (interval1 == one) << std::endl;
std::cout << "interval1!=one: " << (interval1 != one) << std::endl;
std::cout << "interval1<=one: ";
try { std::cout << (interval1 <= one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval1<one: ";
try { std::cout << (interval1 < one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval1==two: " << (interval1 == two) << std::endl;
std::cout << "interval2==one: ";
try { std::cout << (interval2 == one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval2==two: ";
try { std::cout << (interval2 == two) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
}
int main () {
test_class<CGAL::Gmpz> ();
test_class<CGAL::Gmpq> ();
return 0;
}

View File

@ -1,37 +0,0 @@
#include <CGAL/MpfiInterval.h>
void test_int () {
int one = 1;
int two = 2;
CGAL::MpfiInterval interval1 (1);
CGAL::MpfiInterval interval2 (0.5, 1.5);
std::cout << "interval1 = " << interval1 << "\tis point: " << interval1.is_point () << std::endl;
std::cout << "interval2 = " << interval2 << "\tis point: " << interval2.is_point () << std::endl;
std::cout << "interval1==one: " << (interval1 == one) << std::endl;
std::cout << "interval1<=one: ";
try { std::cout << (interval1 <= one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval1<one: ";
try { std::cout << (interval1 < one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval1==two: " << (interval1 == two) << std::endl;
std::cout << "interval2==one: ";
try { std::cout << (interval2 == one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval2==two: ";
try { std::cout << (interval2 == two) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
}
int main () {
test_int ();
return 0;
}

View File

@ -1,41 +0,0 @@
#include <mpfr.h>
#include <CGAL/MpfiInterval.h>
void test_mpfr () {
mpfr_t one, two;
mpfr_inits (one, two, NULL);
mpfr_set_si (one, 1, GMP_RNDN);
mpfr_set_si (two, 2, GMP_RNDN);
CGAL::MpfiInterval interval1 (1);
CGAL::MpfiInterval interval2 (0.5, 1.5);
std::cout << "interval1 = " << interval1 << "\tis point: " << interval1.is_point () << std::endl;
std::cout << "interval2 = " << interval2 << "\tis point: " << interval2.is_point () << std::endl;
std::cout << "interval1==one: " << (interval1 == one) << std::endl;
std::cout << "one==interval1: " << (one == interval1) << std::endl;
std::cout << "interval1<=one: ";
try { std::cout << (interval1 <= one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval1<one: ";
try { std::cout << (interval1 < one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval1==two: " << (interval1 == two) << std::endl;
std::cout << "interval2==one: ";
try { std::cout << (interval2 == one) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
std::cout << "interval2==two: ";
try { std::cout << (interval2 == two) << std::endl;
} catch (CGAL::comparison_overlap_exn &o) { std::cout << o.what () << std::endl; }
}
int main () {
test_mpfr ();
return 0;
}