ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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 <libplatform/system.h>
22#include <stdbool.h>
23#include <stdlib.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
42static inline bool is_test_environment(void) {
43#if defined(TESTING)
44 return true; // Compile-time test environment detection
45#else
46 // Runtime check for environment variables (set by test harness)
47 return platform_getenv("TESTING") != NULL;
48#endif
49}
50
52
53#ifdef __cplusplus
54}
55#endif
const char * platform_getenv(const char *name)
Definition system.c:45