xref: /freebsd/contrib/sendmail/include/sm/test.h (revision 39beb93c3f8bdbf72a61fda42300b5ebed7390c8)
1 /*
2  * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3  *	All rights reserved.
4  *
5  * By using this file, you agree to the terms and conditions set
6  * forth in the LICENSE file which can be found at the top level of
7  * the sendmail distribution.
8  *
9  *	$Id: test.h,v 1.6 2001/04/03 01:53:01 gshapiro Exp $
10  */
11 
12 /*
13 **  Abstractions for writing a libsm test program.
14 */
15 
16 #ifndef SM_TEST_H
17 # define SM_TEST_H
18 
19 # include <sm/gen.h>
20 
21 # if defined(__STDC__) || defined(__cplusplus)
22 #  define SM_TEST(cond) sm_test(cond, #cond, __FILE__, __LINE__)
23 # else /* defined(__STDC__) || defined(__cplusplus) */
24 #  define SM_TEST(cond) sm_test(cond, "cond", __FILE__, __LINE__)
25 # endif /* defined(__STDC__) || defined(__cplusplus) */
26 
27 extern int SmTestIndex;
28 extern int SmTestNumErrors;
29 
30 extern void
31 sm_test_begin __P((
32 	int _argc,
33 	char **_argv,
34 	char *_testname));
35 
36 extern bool
37 sm_test __P((
38 	bool _success,
39 	char *_expr,
40 	char *_filename,
41 	int _lineno));
42 
43 extern int
44 sm_test_end __P((void));
45 
46 #endif /* ! SM_TEST_H */
47