blob: cebfb63d87b5f11fca1a118072ffca1d12a96b79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifndef _TEST_CCAPI_GLOBALS_H_
#define _TEST_CCAPI_GLOBALS_H_
#include <Kerberos/CredentialsCache.h>
/* GLOBALS */
extern unsigned int total_failure_count;
extern unsigned int failure_count;
extern const char *current_test_name;
extern const char *current_test_activity;
extern const char * ccapi_error_strings[30];
const char *translate_ccapi_error(cc_int32 err);
#define T_CCAPI_INIT \
do { \
current_test_name = NULL; \
current_test_activity = NULL; \
} while( 0 )
#define BEGIN_TEST(name) \
do { \
current_test_name = name; \
failure_count = 0; \
test_header(current_test_name); \
} while( 0 )
#define BEGIN_CHECK_ONCE(x) \
do { \
if (x) { \
current_test_activity = x; \
} \
} while( 0 )
#define END_CHECK_ONCE \
do { \
current_test_activity = NULL; \
} while( 0 )
#define END_TEST_AND_RETURN \
test_footer(current_test_name, failure_count); \
total_failure_count += failure_count; \
return failure_count;
#endif /* _TEST_CCAPI_GLOBALS_H_ */
|