diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-03-02 19:04:49 +0000 |
---|---|---|
committer | <> | 2015-05-08 15:30:59 +0000 |
commit | f800382616186a5d30e28d8b2c51e97a9a8360f2 (patch) | |
tree | 0d5270190548a37223d14b54383ce8a3d3af5302 /includes/t_api.h | |
download | isc-dhcp-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_isc-dhcp-tarball/dhcp-4.2.8.tar.gz.HEADdhcp-4.2.8master
Diffstat (limited to 'includes/t_api.h')
-rw-r--r-- | includes/t_api.h | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/includes/t_api.h b/includes/t_api.h new file mode 100644 index 0000000..e22bb83 --- /dev/null +++ b/includes/t_api.h @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2004-2007,2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1999-2001 Internet Software Consortium. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: t_api.h,v 1.3.8.1 2009/11/20 01:49:01 sar Exp $ */ + +#ifndef TESTS_T_API_H +#define TESTS_T_API_H 1 + +/*! \file tests/t_api.h */ + +#include <stdio.h> + +#include <omapip/result.h> +#include <isc/lang.h> +#include <isc/formatcheck.h> + +/* + * + * Result codes. + * + */ + +#define T_PASS 0x1 +#define T_FAIL 0x2 +#define T_UNRESOLVED 0x3 +#define T_UNSUPPORTED 0x4 +#define T_UNTESTED 0x5 +#define T_THREADONLY 0x6 + +/* + * + * Assertion class codes. + * + */ + +#define T_OPTIONAL 0x0 +#define T_REQUIRED 0x1 + +/* + * Misc + */ + +#define T_MAXTOKS 16 +#define T_ARG(n) (*(av + (n))) + +typedef void (*PFV)(void); + +typedef struct { + PFV pfv; + const char *func_name; +} testspec_t; + +extern int T_debug; +extern testspec_t T_testlist[]; + +ISC_LANG_BEGINDECLS + +void +t_assert(const char *component, int anum, int class, const char *what, ...) + ISC_FORMAT_PRINTF(4, 5); + +void +t_info(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); + +void +t_result(int result); + +char * +t_getenv(const char *name); + +char * +t_fgetbs(FILE *fp); + +isc_result_t +t_dns_result_fromtext(char *result); + +unsigned int +t_dc_method_fromtext(char *dc_method); + +int +t_bustline(char *line, char **toks); + +int +t_eval(const char *filename, int (*func)(char **), int nargs); + +ISC_LANG_ENDDECLS + +#endif /* TESTS_T_API_H */ + |