Test I/O for Lazy_exact_nt<mpq_class>.

This commit is contained in:
Marc Glisse 2016-10-27 21:32:48 +02:00
parent aad47904b6
commit cca29ccd2c
1 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include <iostream>
#include <CGAL/mpq_class.h>
#include <CGAL/Lazy_exact_nt.h>
#include <CGAL/Test/_test_algebraic_structure.h>
#include <CGAL/Test/_test_real_embeddable.h>
@ -33,6 +34,16 @@ int main() {
mpq_class q;
std::istringstream in("12.34");
in >> CGAL::iformat(q);
assert(in);
assert(q.get_num() == 617);
assert(q.get_den() == 50);
}
{
CGAL::Lazy_exact_nt<mpq_class> x;
std::istringstream in("12.34");
in >> x;
mpq_class q = x.exact();
assert(in);
assert(q.get_num() == 617);
assert(q.get_den() == 50);
}