unit-tests: Make fixture functions optional

This commit is contained in:
Tobias Brunner
2014-06-19 14:00:48 +02:00
parent f609682e5d
commit a1625fdc9b
+8 -2
View File
@@ -187,11 +187,17 @@ static bool call_fixture(test_case_t *tcase, bool up)
{
if (up)
{
fixture->setup();
if (fixture->setup)
{
fixture->setup();
}
}
else
{
fixture->teardown();
if (fixture->teardown)
{
fixture->teardown();
}
}
}
else