ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
test_env.h
Go to the documentation of this file.
1#pragma once
2
20
21#include <stdbool.h>
22#include <stdlib.h>
23#include <libplatform/system.h>
24
38static inline bool is_test_environment(void) {
39#if defined(CRITERION_TEST) || defined(__CRITERION__) || defined(TESTING)
40 return true; // Compile-time test environment detection
41#else
42 // Runtime check for environment variables (set by test harness)
43 return platform_getenv("CRITERION_TEST") != NULL || platform_getenv("TESTING") != NULL;
44#endif
45}
46
const char * platform_getenv(const char *name)
Get an environment variable value.