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