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 /* 13*7c478bd9Sstevel@tonic-gate ** Abstractions for writing a libsm test program. 14*7c478bd9Sstevel@tonic-gate */ 15*7c478bd9Sstevel@tonic-gate 16*7c478bd9Sstevel@tonic-gate #ifndef SM_TEST_H 17*7c478bd9Sstevel@tonic-gate # define SM_TEST_H 18*7c478bd9Sstevel@tonic-gate 19*7c478bd9Sstevel@tonic-gate # include <sm/gen.h> 20*7c478bd9Sstevel@tonic-gate 21*7c478bd9Sstevel@tonic-gate # if defined(__STDC__) || defined(__cplusplus) 22*7c478bd9Sstevel@tonic-gate # define SM_TEST(cond) sm_test(cond, #cond, __FILE__, __LINE__) 23*7c478bd9Sstevel@tonic-gate # else /* defined(__STDC__) || defined(__cplusplus) */ 24*7c478bd9Sstevel@tonic-gate # define SM_TEST(cond) sm_test(cond, "cond", __FILE__, __LINE__) 25*7c478bd9Sstevel@tonic-gate # endif /* defined(__STDC__) || defined(__cplusplus) */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate extern int SmTestIndex; 28*7c478bd9Sstevel@tonic-gate extern int SmTestNumErrors; 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate extern void 31*7c478bd9Sstevel@tonic-gate sm_test_begin __P(( 32*7c478bd9Sstevel@tonic-gate int _argc, 33*7c478bd9Sstevel@tonic-gate char **_argv, 34*7c478bd9Sstevel@tonic-gate char *_testname)); 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate extern bool 37*7c478bd9Sstevel@tonic-gate sm_test __P(( 38*7c478bd9Sstevel@tonic-gate bool _success, 39*7c478bd9Sstevel@tonic-gate char *_expr, 40*7c478bd9Sstevel@tonic-gate char *_filename, 41*7c478bd9Sstevel@tonic-gate int _lineno)); 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate extern int 44*7c478bd9Sstevel@tonic-gate sm_test_end __P((void)); 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gate #endif /* ! SM_TEST_H */ 47