Fix unit test golden file reading (#471)

This commit is contained in:
Andrey Zhatkin 2019-09-25 13:56:10 +03:00
parent 99765325a2
commit fc4d8fd75d

View File

@ -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);