00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TESTS_T_API_H
00021 #define TESTS_T_API_H 1
00022
00025 #include <stdio.h>
00026
00027 #include <omapip/result.h>
00028 #include <isc/lang.h>
00029 #include <isc/formatcheck.h>
00030
00031
00032
00033
00034
00035
00036
00037 #define T_PASS 0x1
00038 #define T_FAIL 0x2
00039 #define T_UNRESOLVED 0x3
00040 #define T_UNSUPPORTED 0x4
00041 #define T_UNTESTED 0x5
00042 #define T_THREADONLY 0x6
00043
00044
00045
00046
00047
00048
00049
00050 #define T_OPTIONAL 0x0
00051 #define T_REQUIRED 0x1
00052
00053
00054
00055
00056
00057 #define T_MAXTOKS 16
00058 #define T_ARG(n) (*(av + (n)))
00059
00060 typedef void (*PFV)(void);
00061
00062 typedef struct {
00063 PFV pfv;
00064 const char *func_name;
00065 } testspec_t;
00066
00067 extern int T_debug;
00068 extern testspec_t T_testlist[];
00069
00070 ISC_LANG_BEGINDECLS
00071
00072 void
00073 t_assert(const char *component, int anum, int class, const char *what, ...)
00074 ISC_FORMAT_PRINTF(4, 5);
00075
00076 void
00077 t_info(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
00078
00079 void
00080 t_result(int result);
00081
00082 char *
00083 t_getenv(const char *name);
00084
00085 char *
00086 t_fgetbs(FILE *fp);
00087
00088 isc_result_t
00089 t_dns_result_fromtext(char *result);
00090
00091 unsigned int
00092 t_dc_method_fromtext(char *dc_method);
00093
00094 int
00095 t_bustline(char *line, char **toks);
00096
00097 int
00098 t_eval(const char *filename, int (*func)(char **), int nargs);
00099
00100 ISC_LANG_ENDDECLS
00101
00102 #endif
00103