ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
logging.h File Reference

Test logging control utilities. More...

Go to the source code of this file.

Macros

#define TEST_LOGGING_SETUP_AND_TEARDOWN()
 Macro to create setup and teardown functions for quiet testing.
 
#define TEST_LOGGING_SETUP_AND_TEARDOWN_WITH_LOG_LEVELS(setup_level, restore_level, disable_stdout, disable_stderr)
 Macro to create setup and teardown functions for quiet testing with custom log level control.
 
#define TEST_LOGGING_SETUP_AND_TEARDOWN_WITH_LOG_LEVEL()    TEST_LOGGING_SETUP_AND_TEARDOWN_WITH_LOG_LEVELS(LOG_FATAL, LOG_DEBUG, true, true)
 Macro to create setup and teardown functions for quiet testing with log level control (default levels)
 
#define TEST_SUITE_WITH_QUIET_LOGGING_AND_LOG_LEVELS(suite_name, setup_level, restore_level, disable_stdout, disable_stderr, ...)
 Macro to create a complete test suite with quiet logging and custom log levels.
 
#define TEST_SUITE_WITH_QUIET_LOGGING(suite_name, ...)
 Macro to create a complete test suite with quiet logging (default log levels)
 
#define TEST_SUITE_WITH_QUIET_LOGGING_AND_LOG_LEVEL(suite_name, ...)
 Macro to create a complete test suite with quiet logging and log level control (default levels)
 
#define TEST_LOGGING_TEMPORARILY_DISABLE()
 Macro to temporarily disable logging for a specific test.
 
#define TEST_LOGGING_TEMPORARILY_DISABLE_STDOUT()
 Macro to temporarily disable only stdout for a specific test.
 
#define TEST_LOGGING_TEMPORARILY_DISABLE_STDERR()
 Macro to temporarily disable only stderr for a specific test.
 
#define TEST_SUITE_WITH_DEBUG_LOGGING(suite_name, ...)    TEST_SUITE_WITH_QUIET_LOGGING_AND_LOG_LEVELS(suite_name, LOG_DEBUG, LOG_DEBUG, false, false, ##__VA_ARGS__)
 Macro to create a complete test suite with debug logging and stdout/stderr enabled.
 
#define TEST_SUITE_WITH_VERBOSE_LOGGING(suite_name, ...)   TEST_SUITE_WITH_DEBUG_LOGGING(suite_name, ##__VA_ARGS__)
 Alias for TEST_SUITE_WITH_DEBUG_LOGGING for verbose output.
 

Functions

int test_logging_disable (bool disable_stdout, bool disable_stderr)
 Disable stdout/stderr output for quiet test execution.
 
int test_logging_restore (void)
 Restore stdout/stderr output after test logging disable.
 
bool test_logging_is_disabled (void)
 Check if logging is currently disabled.
 

Detailed Description

Test logging control utilities.

Definition in file tests/logging.h.