ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
test_env.h
Go to the documentation of this file.
1#pragma once
2
21#include <stdbool.h>
22#include <stdlib.h>
23#include "../platform/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.
Definition wasm/system.c:39
ClangTool/LibTooling compatibility shim for stdbool.h.