From cca29ccd2ca51dcd2592b4f0fa548a26f813bba2 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 27 Oct 2016 21:32:48 +0200 Subject: [PATCH] Test I/O for Lazy_exact_nt. --- Number_types/test/Number_types/mpq_class.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Number_types/test/Number_types/mpq_class.cpp b/Number_types/test/Number_types/mpq_class.cpp index a6c759768b1..31b46847615 100644 --- a/Number_types/test/Number_types/mpq_class.cpp +++ b/Number_types/test/Number_types/mpq_class.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -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 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); }