[msvc] Avoid warnings in tests (#276)

This commit is contained in:
Tadej Novak
2022-04-26 17:44:49 +02:00
committed by GitHub
parent 32ed70c95d
commit 2dcc9d8b61
19 changed files with 77 additions and 61 deletions

View File

@@ -20,7 +20,11 @@ namespace {
std::string toAbsoluteURL(const std::string& fileName) {
char buff[PATH_MAX + 1];
#ifdef _MSC_VER
char* cwd = _getcwd( buff, PATH_MAX + 1 );
#else
char* cwd = getcwd( buff, PATH_MAX + 1 );
#endif
std::string url = { "file://" + std::string(cwd) + "/test/fixtures/storage/assets/" + fileName };
assert(url.size() <= PATH_MAX);
return url;