Retrigger unittest

pull/2175/head
Kim Kulling 2018-10-08 20:40:01 +02:00
parent e1247e81e1
commit 01921ee81f
1 changed files with 12 additions and 11 deletions

View File

@ -347,21 +347,22 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeTrianglesFan) {
}
}
std::vector<char> ReadFile(const char* name)
{
std::vector<char> ReadFile(const char* name) {
std::vector<char> ret;
FILE* p = ::fopen(name, "r");
if (p)
{
::fseek(p, 0, SEEK_END);
const auto size = ::ftell(p);
::fseek(p, 0, SEEK_SET);
ret.resize(size);
::fread(&ret[0], 1, size, p);
::fclose(p);
if (nullptr == p) {
return ret;
}
::fseek(p, 0, SEEK_END);
const auto size = ::ftell(p);
::fseek(p, 0, SEEK_SET);
ret.resize(size);
::fread(&ret[0], 1, size, p);
::fclose(p);
return ret;
}