mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-16 18:03:44 +08:00
Fixed more compiler warnings for unit tests
This commit is contained in:
@@ -10,8 +10,27 @@
|
||||
|
||||
#include "lwip/init.h"
|
||||
|
||||
Suite* create_suite(const char* name, testfunc *tests, size_t num_tests, SFun setup, SFun teardown)
|
||||
{
|
||||
size_t i;
|
||||
Suite *s = suite_create(name);
|
||||
|
||||
int main()
|
||||
for(i = 0; i < num_tests; i++) {
|
||||
TCase *tc_core = tcase_create(name);
|
||||
if ((setup != NULL) || (teardown != NULL)) {
|
||||
tcase_add_checked_fixture(tc_core, setup, teardown);
|
||||
}
|
||||
tcase_add_named_test(tc_core, tests[i]);
|
||||
suite_add_tcase(s, tc_core);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
#ifdef LWIP_UNITTESTS_LIB
|
||||
int lwip_unittests_run(void)
|
||||
#else
|
||||
int main(void)
|
||||
#endif
|
||||
{
|
||||
int number_failed;
|
||||
SRunner *sr;
|
||||
|
||||
Reference in New Issue
Block a user