ReactOS  0.4.14-dev-1112-g2b067d6
lwip_unittests.c File Reference
#include "lwip_check.h"
#include "udp/test_udp.h"
#include "tcp/test_tcp.h"
#include "tcp/test_tcp_oos.h"
#include "core/test_mem.h"
#include "core/test_pbuf.h"
#include "etharp/test_etharp.h"
#include "dhcp/test_dhcp.h"
#include "lwip/init.h"
Include dependency graph for lwip_unittests.c:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 14 of file lwip_unittests.c.

15 {
16  int number_failed;
17  SRunner *sr;
18  size_t i;
19  suite_getter_fn* suites[] = {
20  udp_suite,
21  tcp_suite,
23  mem_suite,
24  pbuf_suite,
25  etharp_suite,
26  dhcp_suite
27  };
28  size_t num = sizeof(suites)/sizeof(void*);
29  LWIP_ASSERT("No suites defined", num > 0);
30 
31  lwip_init();
32 
33  sr = srunner_create((suites[0])());
34  for(i = 1; i < num; i++) {
35  srunner_add_suite(sr, ((suite_getter_fn*)suites[i])());
36  }
37 
38 #ifdef LWIP_UNITTESTS_NOFORK
39  srunner_set_fork_status(sr, CK_NOFORK);
40 #endif
41 #ifdef LWIP_UNITTESTS_FORK
42  srunner_set_fork_status(sr, CK_FORK);
43 #endif
44 
45  srunner_run_all(sr, CK_NORMAL);
46  number_failed = srunner_ntests_failed(sr);
47  srunner_free(sr);
48  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
49 }
Suite * tcp_oos_suite(void)
Definition: test_tcp_oos.c:932
END_TEST Suite * udp_suite(void)
Definition: test_udp.c:62
#define LWIP_ASSERT(message, assertion)
Definition: debug.h:66
END_TEST Suite * tcp_suite(void)
Definition: test_tcp.c:659
#define EXIT_SUCCESS
Definition: rdjpgcom.c:55
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void lwip_init(void)
Definition: init.c:286
GLuint GLuint num
Definition: glext.h:9618
#define EXIT_FAILURE
Definition: jerror.c:33
Suite *() suite_getter_fn(void)
Definition: lwip_check.h:17