mirror of https://github.com/CGAL/cgal
Fix test read_LAS
This commit is contained in:
parent
37b5928df2
commit
c4867780cc
|
|
@ -168,7 +168,8 @@ void test_LAS(const std::string& s)
|
||||||
ok = CGAL::read_LAS(s.c_str(), ps);
|
ok = CGAL::read_LAS(s.c_str(), ps);
|
||||||
assert(ok);
|
assert(ok);
|
||||||
ps.clear();
|
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);
|
ok = CGAL::read_LAS(in, ps);
|
||||||
assert(ok);
|
assert(ok);
|
||||||
const char* ext = "las";
|
const char* ext = "las";
|
||||||
|
|
@ -178,11 +179,14 @@ void test_LAS(const std::string& s)
|
||||||
assert(ok);
|
assert(ok);
|
||||||
ok = CGAL::write_LAS(fname.c_str(), ps);
|
ok = CGAL::write_LAS(fname.c_str(), ps);
|
||||||
assert(ok);
|
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);
|
ok = CGAL::write_LAS(out, ps);
|
||||||
assert(ok);
|
assert(ok);
|
||||||
CGAL::Point_set_3<Point_3, Vector_3> ps2;
|
CGAL::Point_set_3<Point_3, Vector_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);
|
ok = CGAL::read_LAS(is, ps2);
|
||||||
assert(ok);
|
assert(ok);
|
||||||
assert(ps_are_equal(ps, ps2));
|
assert(ps_are_equal(ps, ps2));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue