Skip to content

Commit

Permalink
Merge pull request google#557 from avzhatkin/master
Browse files Browse the repository at this point in the history
Fix unit test golden file compare on Windows-- explicitly open files as binary.
  • Loading branch information
tomfinegan committed Sep 25, 2019
2 parents e8daed7 + fc4d8fd commit 736190f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/draco/core/draco_test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool GenerateGoldenFile(const std::string &golden_file_name, const void *data,
bool CompareGoldenFile(const std::string &golden_file_name, const void *data,
int data_size) {
const std::string golden_path = GetTestFileFullPath(golden_file_name);
std::ifstream in_file(golden_path);
std::ifstream in_file(golden_path, std::ios::binary);
if (!in_file || data_size < 0)
return false;
const char *const data_c8 = static_cast<const char *>(data);
Expand Down

0 comments on commit 736190f

Please sign in to comment.