Merge branch 'master' into pfm_pnm

This commit is contained in:
Georg Hagen
2025-01-04 16:54:16 +01:00
37 changed files with 996 additions and 495 deletions

View File

@@ -259,4 +259,10 @@ TEST_CASE("Split with non-null-terminated strings", "[Utils]")
input = { ",,,|", 3 };
result = Utils::Split(input, ',');
REQUIRE(result.empty());
}
TEST_CASE("Read file from string literal", "[Utils]")
{
// all we need is to check if it compiles
REQUIRE(Utils::ReadFile("", true).Empty());
}

View File

@@ -71,16 +71,16 @@ TEST_CASE("GetCacheFilePath", "[WebResourceLoader]")
REQUIRE(cachePath.parent_path().filename().string() == "resources");
}
TEST_CASE("DownloadResource from non-ssl uri", "[WebResourceLoader]")
{
TestWebResourceLoader loader;
std::string url = "http://neverssl.com";
Array<char> resourceData = loader.DownloadResource(url);
REQUIRE(!resourceData.Empty());
std::filesystem::path cachePath = loader.GetCacheFilePath(url);
REQUIRE(std::filesystem::exists(cachePath));
std::filesystem::remove(cachePath);
}
//TEST_CASE("DownloadResource from non-ssl uri", "[WebResourceLoader]")
//{
// TestWebResourceLoader loader;
// std::string url = "http://neverssl.com";
// Array<char> resourceData = loader.DownloadResource(url);
// REQUIRE(!resourceData.Empty());
// std::filesystem::path cachePath = loader.GetCacheFilePath(url);
// REQUIRE(std::filesystem::exists(cachePath));
// std::filesystem::remove(cachePath);
//}
TEST_CASE("DownloadResource with curl", "[WebResourceLoader]")
{