File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / dhcp / tests / unit_test_sample.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Oct 9 09:06:55 2012 UTC (11 years, 8 months ago) by misho
Branches: dhcp, MAIN
CVS tags: v4_1_R7p0, v4_1_R7, v4_1_R4, HEAD
dhcp 4.1 r7

    1: #include "config.h"
    2: #include "t_api.h"
    3: 
    4: static void foo(void);
    5: 
    6: /*
    7:  * T_testlist is a list of tests that are invoked.
    8:  */
    9: testspec_t T_testlist[] = {
   10: 	{	foo,		"sample test" 	},
   11: 	{	NULL,		NULL 		}
   12: };
   13: 
   14: static void
   15: foo(void) {
   16: 	static const char *test_desc = 
   17: 		"this is an example test, for no actual module";
   18: 
   19: 	t_assert("sample", 1, T_REQUIRED, test_desc);
   20: 
   21: 	/* ... */	/* Test code would go here. */
   22: 
   23: 	t_result(T_PASS);
   24: }
   25: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>