2 * Copyright (C) 2004-2007,2009 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: t_api.h,v 1.3.8.1 2009-11-20 01:49:01 sar Exp $ */
21 #define TESTS_T_API_H 1
23 /*! \file tests/t_api.h */
27 #include <omapip/result.h>
29 #include <isc/formatcheck.h>
39 #define T_UNRESOLVED 0x3
40 #define T_UNSUPPORTED 0x4
41 #define T_UNTESTED 0x5
42 #define T_THREADONLY 0x6
46 * Assertion class codes.
50 #define T_OPTIONAL 0x0
51 #define T_REQUIRED 0x1
58 #define T_ARG(n) (*(av + (n)))
60 typedef void (*PFV)(void);
64 const char *func_name;
68 extern testspec_t T_testlist[];
73 t_assert(const char *component, int anum, int class, const char *what, ...)
74 ISC_FORMAT_PRINTF(4, 5);
77 t_info(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
83 t_getenv(const char *name);
89 t_dns_result_fromtext(char *result);
92 t_dc_method_fromtext(char *dc_method);
95 t_bustline(char *line, char **toks);
98 t_eval(const char *filename, int (*func)(char **), int nargs);
102 #endif /* TESTS_T_API_H */