tests: Don't run test if name or function is NULL

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2016-04-11 15:04:07 -04:00
parent 811270a832
commit 5a4d5bcc44
1 changed files with 3 additions and 0 deletions

View File

@ -92,6 +92,9 @@ static void run_test(struct UnitTest *test)
{
test_num = 0;
if (!test->t_name || !test->t_func)
return;
printf("Testing %s\n", test->t_name);
test->t_func();
printf("\n");