xref: /titanic_41/usr/src/cmd/sendmail/include/sm/test.h (revision 9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bb)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 /*
15 **  Abstractions for writing a libsm test program.
16 */
17 
18 #ifndef SM_TEST_H
19 # define SM_TEST_H
20 
21 # include <sm/gen.h>
22 
23 # if defined(__STDC__) || defined(__cplusplus)
24 #  define SM_TEST(cond) sm_test(cond, #cond, __FILE__, __LINE__)
25 # else /* defined(__STDC__) || defined(__cplusplus) */
26 #  define SM_TEST(cond) sm_test(cond, "cond", __FILE__, __LINE__)
27 # endif /* defined(__STDC__) || defined(__cplusplus) */
28 
29 extern int SmTestIndex;
30 extern int SmTestNumErrors;
31 
32 extern void
33 sm_test_begin __P((
34 	int _argc,
35 	char **_argv,
36 	char *_testname));
37 
38 extern bool
39 sm_test __P((
40 	bool _success,
41 	char *_expr,
42 	char *_filename,
43 	int _lineno));
44 
45 extern int
46 sm_test_end __P((void));
47 
48 #endif /* ! SM_TEST_H */
49