1
1
#include "test_util.h"
2
#include "test_util_common.h"
2
3
#include <nih/logging.h>
3
4
#include <nih/test.h>
11
* Compare @a and @b either or both of which may be NULL.
13
* Returns 0 if strings are identical or both NULL, else 1.
16
string_check (const char *a, const char *b)
31
7
* event_operator_diff:
32
8
* @a: first Blocked,
33
9
* @b: second Blocked,
93
* Ensure most common data structures are empty.
95
* Note: Control connections are not handled as the init routine
96
* does more than just initialise the structure.
99
ensure_env_clean (void)
101
TEST_NE_P (sessions, NULL);
102
TEST_NE_P (events, NULL);
103
TEST_NE_P (conf_sources, NULL);
104
TEST_NE_P (job_classes, NULL);
105
TEST_NE_P (log_unflushed_files, NULL);
107
/* Ensure environment is clean before test is run */
108
TEST_LIST_EMPTY (sessions);
109
TEST_LIST_EMPTY (events);
110
TEST_LIST_EMPTY (conf_sources);
111
TEST_HASH_EMPTY (job_classes);
112
TEST_LIST_EMPTY (log_unflushed_files);
118
* Re-initialise all common data structures.
120
* Note: Like ensure_env_clean(), control connections are not handled.
129
log_unflushed_init ();
133
nih_free (job_classes);
134
nih_free (conf_sources);
135
nih_free (log_unflushed_files);
141
log_unflushed_files = NULL;
147
log_unflushed_init ();