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