tests: Don't run test if name or function is NULL
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
811270a832
commit
5a4d5bcc44
|
@ -92,6 +92,9 @@ static void run_test(struct UnitTest *test)
|
||||||
{
|
{
|
||||||
test_num = 0;
|
test_num = 0;
|
||||||
|
|
||||||
|
if (!test->t_name || !test->t_func)
|
||||||
|
return;
|
||||||
|
|
||||||
printf("Testing %s\n", test->t_name);
|
printf("Testing %s\n", test->t_name);
|
||||||
test->t_func();
|
test->t_func();
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
Loading…
Reference in New Issue