OpenVPN
|
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include "errlevel.h"
#include "error.h"
#include "mock_msg.h"
Go to the source code of this file.
Functions | |
void | mock_set_debug_level (int level) |
Mock debug level defaults to 0, which gives clean(-ish) test reports. | |
int | mock_get_debug_level (void) |
void | mock_set_print_debug_level (int level) |
int | get_debug_level (void) |
void | x_msg_va (const unsigned int flags, const char *format, va_list arglist) |
void | x_msg (const unsigned int flags, const char *format,...) |
void | assert_failed (const char *filename, int line, const char *condition) |
void | out_of_memory (void) |
bool | dont_mute (unsigned int flags) |
Check muting filter. | |
Variables | |
unsigned int | x_debug_level = 0 |
unsigned int | print_x_debug_level = 0 |
bool | fatal_error_triggered = false |
char | mock_msg_buf [MOCK_MSG_BUF] |
void assert_failed | ( | const char * | filename, |
int | line, | ||
const char * | condition | ||
) |
Definition at line 105 of file mock_msg.c.
bool dont_mute | ( | unsigned int | flags | ) |
int get_debug_level | ( | void | ) |
Definition at line 69 of file mock_msg.c.
References x_debug_level.
int mock_get_debug_level | ( | void | ) |
Definition at line 57 of file mock_msg.c.
References x_debug_level.
Referenced by test_atoi_variants().
void mock_set_debug_level | ( | int | level | ) |
Mock debug level defaults to 0, which gives clean(-ish) test reports.
Call this function from your test driver to increase debug output when you need debug output.
Definition at line 51 of file mock_msg.c.
References x_debug_level.
Referenced by test_atoi_variants().
void mock_set_print_debug_level | ( | int | level | ) |
Definition at line 63 of file mock_msg.c.
References print_x_debug_level.
void out_of_memory | ( | void | ) |
Definition at line 126 of file mock_msg.c.
void x_msg | ( | const unsigned int | flags, |
const char * | format, | ||
... | |||
) |
Definition at line 94 of file mock_msg.c.
References x_msg_va().
void x_msg_va | ( | const unsigned int | flags, |
const char * | format, | ||
va_list | arglist | ||
) |
Definition at line 75 of file mock_msg.c.
References CLEAR, fatal_error_triggered, M_DEBUG_LEVEL, M_FATAL, mock_msg_buf, and print_x_debug_level.
Referenced by x_msg().
bool fatal_error_triggered = false |
Definition at line 45 of file mock_msg.c.
Referenced by x_msg_va().
char mock_msg_buf[MOCK_MSG_BUF] |
Definition at line 47 of file mock_msg.c.
Referenced by test_atoi_variants(), and x_msg_va().
unsigned int print_x_debug_level = 0 |
Definition at line 43 of file mock_msg.c.
Referenced by mock_set_print_debug_level(), and x_msg_va().
unsigned int x_debug_level = 0 |
Definition at line 42 of file mock_msg.c.
Referenced by check_debug_level(), get_debug_level(), mock_get_debug_level(), and mock_set_debug_level().