[client] tests: support native Windows builds

Use platform-appropriate temporary-file handling and function signatures
when compiling the standalone tests with MSVC-compatible Clang.
This commit is contained in:
Geoffrey McRae
2026-11-06 14:38:02 +11:00
parent 7530943446
commit aa064e3fa6
4 changed files with 28 additions and 23 deletions

View File

@@ -356,10 +356,10 @@ static void testCfgValues(void)
CHECK(!resampler->parser(resampler, "linear"));
struct Option * renderer = opt("app", "renderer");
CHECK(renderer->parser(renderer, "OpenGL"));
CHECK(renderer->parser(renderer, "EGL"));
CHECK(g_params.forceRenderer);
CHECK(g_params.forceRendererIndex == 1);
checkStr(renderer->toString(renderer), "OpenGL");
CHECK(g_params.forceRendererIndex == 0);
checkStr(renderer->toString(renderer), "EGL");
CHECK(renderer->parser(renderer, "auto"));
CHECK(!g_params.forceRenderer);
checkStr(renderer->toString(renderer), "auto");
@@ -406,7 +406,7 @@ static void testCfgSize(void)
static void loadCfg(const char * text)
{
char path[] = "/tmp/lg-config-test-XXXXXX";
char path[] = "lg-config-test-XXXXXX";
const int fd = mkstemp(path);
CHECK(fd >= 0);
const size_t size = strlen(text);