Commit 97ab52a7 authored by Laurent Belcour's avatar Laurent Belcour

[Fix] Correct data-io test: a binary file was not opened using

ios::binary flag.
parent 7657caad
......@@ -256,13 +256,13 @@ int main(int argc, char** argv)
// Now use the binary output format.
std::ofstream out;
out.open(temp_file3.name().c_str(), std::ofstream::binary);
out.open(temp_file3.name().c_str(), std::ios::out | std::ios::binary);
save_data_as_binary(out, *sample2);
out.close();
// This should automatically load using the binary format loader.
std::ifstream temp3;
temp3.open(temp_file3);
temp3.open(temp_file3, std::ios::in | std::ios::binary);
auto sample3 = plugins_manager::load_data("vertical_segment", temp3);
TEST_ASSERT(sample1->equals(*sample2));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment