xref: /netbsd-src/external/mpl/dhcp/dist/tests/unit_test_sample.c (revision ce893c7eea48d62b6f0d8ef9958789ad27d03f6f)
1*ce893c7eSchristos /*	$NetBSD: unit_test_sample.c,v 1.2 2018/04/07 22:37:30 christos Exp $	*/
26fb29d29Schristos 
36fb29d29Schristos #include "config.h"
46fb29d29Schristos #include "t_api.h"
56fb29d29Schristos 
66fb29d29Schristos static void foo(void);
76fb29d29Schristos 
86fb29d29Schristos /*
96fb29d29Schristos  * T_testlist is a list of tests that are invoked.
106fb29d29Schristos  */
116fb29d29Schristos testspec_t T_testlist[] = {
126fb29d29Schristos 	{	foo,		"sample test" 	},
136fb29d29Schristos 	{	NULL,		NULL 		}
146fb29d29Schristos };
156fb29d29Schristos 
166fb29d29Schristos static void
foo(void)176fb29d29Schristos foo(void) {
186fb29d29Schristos 	static const char *test_desc =
196fb29d29Schristos 		"this is an example test, for no actual module";
206fb29d29Schristos 
216fb29d29Schristos 	t_assert("sample", 1, T_REQUIRED, test_desc);
226fb29d29Schristos 
236fb29d29Schristos 	/* ... */	/* Test code would go here. */
246fb29d29Schristos 
256fb29d29Schristos 	t_result(T_PASS);
266fb29d29Schristos }
276fb29d29Schristos 
28