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