diff options
author | Alexandra Ellwood <lxs@mit.edu> | 2007-05-31 21:06:54 +0000 |
---|---|---|
committer | Alexandra Ellwood <lxs@mit.edu> | 2007-05-31 21:06:54 +0000 |
commit | d45eeb7f708d5be2e9fbdbc54a04655776074f6c (patch) | |
tree | 5ab3d7e31f285ac4d6900d3abc647cbb53a05f8d /src/ccapi/test/test_ccapi_globals.h | |
parent | 66bd29f512b9bdd5e808d645118862112973d2d6 (diff) | |
download | krb5-d45eeb7f708d5be2e9fbdbc54a04655776074f6c.tar.gz krb5-d45eeb7f708d5be2e9fbdbc54a04655776074f6c.tar.xz krb5-d45eeb7f708d5be2e9fbdbc54a04655776074f6c.zip |
Move CCAPI sources to krb5 repository
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19564 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/ccapi/test/test_ccapi_globals.h')
-rw-r--r-- | src/ccapi/test/test_ccapi_globals.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/ccapi/test/test_ccapi_globals.h b/src/ccapi/test/test_ccapi_globals.h new file mode 100644 index 000000000..cebfb63d8 --- /dev/null +++ b/src/ccapi/test/test_ccapi_globals.h @@ -0,0 +1,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_ */ |