From c4867780cc00b1f2927aa1eeda8bcb678db56bd9 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 1 Dec 2020 12:15:51 +0100 Subject: [PATCH] Fix test read_LAS --- .../test_read_write_point_set.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Point_set_processing_3/test/Point_set_processing_3/test_read_write_point_set.cpp b/Point_set_processing_3/test/Point_set_processing_3/test_read_write_point_set.cpp index 060725cbda8..fa99dbbdddb 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/test_read_write_point_set.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/test_read_write_point_set.cpp @@ -168,7 +168,8 @@ void test_LAS(const std::string& s) ok = CGAL::read_LAS(s.c_str(), ps); assert(ok); ps.clear(); - std::ifstream in(s); + std::ifstream in(s, std::ios::binary); + CGAL::set_mode(in, CGAL::IO::BINARY); ok = CGAL::read_LAS(in, ps); assert(ok); const char* ext = "las"; @@ -178,11 +179,14 @@ void test_LAS(const std::string& s) assert(ok); ok = CGAL::write_LAS(fname.c_str(), ps); assert(ok); - std::ofstream out(fname); + std::ofstream out(fname, std::ios::binary); + CGAL::set_mode(out, CGAL::IO::BINARY); ok = CGAL::write_LAS(out, ps); assert(ok); CGAL::Point_set_3 ps2; - std::ifstream is(fname); + + std::ifstream is(fname, std::ios::binary); + CGAL::set_mode(is, CGAL::IO::BINARY); ok = CGAL::read_LAS(is, ps2); assert(ok); assert(ps_are_equal(ps, ps2));