190792Sgshapiro/*
2261363Sgshapiro * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
390792Sgshapiro *	All rights reserved.
490792Sgshapiro *
590792Sgshapiro * By using this file, you agree to the terms and conditions set
690792Sgshapiro * forth in the LICENSE file which can be found at the top level of
790792Sgshapiro * the sendmail distribution.
890792Sgshapiro *
9266692Sgshapiro *	$Id: test.h,v 1.7 2013-11-22 20:51:32 ca Exp $
1090792Sgshapiro */
1190792Sgshapiro
1290792Sgshapiro/*
1390792Sgshapiro**  Abstractions for writing a libsm test program.
1490792Sgshapiro*/
1590792Sgshapiro
1690792Sgshapiro#ifndef SM_TEST_H
1790792Sgshapiro# define SM_TEST_H
1890792Sgshapiro
1990792Sgshapiro# include <sm/gen.h>
2090792Sgshapiro
2190792Sgshapiro# if defined(__STDC__) || defined(__cplusplus)
2290792Sgshapiro#  define SM_TEST(cond) sm_test(cond, #cond, __FILE__, __LINE__)
2390792Sgshapiro# else /* defined(__STDC__) || defined(__cplusplus) */
2490792Sgshapiro#  define SM_TEST(cond) sm_test(cond, "cond", __FILE__, __LINE__)
2590792Sgshapiro# endif /* defined(__STDC__) || defined(__cplusplus) */
2690792Sgshapiro
2790792Sgshapiroextern int SmTestIndex;
2890792Sgshapiroextern int SmTestNumErrors;
2990792Sgshapiro
3090792Sgshapiroextern void
3190792Sgshapirosm_test_begin __P((
3290792Sgshapiro	int _argc,
3390792Sgshapiro	char **_argv,
3490792Sgshapiro	char *_testname));
3590792Sgshapiro
3690792Sgshapiroextern bool
3790792Sgshapirosm_test __P((
3890792Sgshapiro	bool _success,
3990792Sgshapiro	char *_expr,
4090792Sgshapiro	char *_filename,
4190792Sgshapiro	int _lineno));
4290792Sgshapiro
4390792Sgshapiroextern int
4490792Sgshapirosm_test_end __P((void));
4590792Sgshapiro
4690792Sgshapiro#endif /* ! SM_TEST_H */
47