mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-13 16:59:04 +08:00
Fix unit test golden file reading (#471)
This commit is contained in:
parent
99765325a2
commit
fc4d8fd75d
@ -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,
|
bool CompareGoldenFile(const std::string &golden_file_name, const void *data,
|
||||||
int data_size) {
|
int data_size) {
|
||||||
const std::string golden_path = GetTestFileFullPath(golden_file_name);
|
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)
|
if (!in_file || data_size < 0)
|
||||||
return false;
|
return false;
|
||||||
const char *const data_c8 = static_cast<const char *>(data);
|
const char *const data_c8 = static_cast<const char *>(data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user