ReactOS 0.4.16-dev-257-g6aa11ac
test_dns.c File Reference
#include "test_dns.h"
#include "lwip/dns.h"
Include dependency graph for test_dns.c:

Go to the source code of this file.

Functions

static void dns_setup (void)
 
static void dns_teardown (void)
 
 START_TEST (test_dns_set_get_server)
 
END_TEST Suite * dns_suite (void)
 

Function Documentation

◆ dns_setup()

static void dns_setup ( void  )
static

Definition at line 8 of file test_dns.c.

9{
10}

Referenced by dns_suite().

◆ dns_suite()

END_TEST Suite * dns_suite ( void  )

Create the suite including all tests for this module

Definition at line 46 of file test_dns.c.

47{
48 testfunc tests[] = {
49 TESTFUNC(test_dns_set_get_server)
50 };
51 return create_suite("DNS", tests, sizeof(tests)/sizeof(testfunc), dns_setup, dns_teardown);
52}
Suite * create_suite(const char *name, testfunc *tests, size_t num_tests, SFun setup, SFun teardown)
#define TESTFUNC(x)
Definition: lwip_check.h:22
static struct test_info tests[]
static void dns_setup(void)
Definition: test_dns.c:8
static void dns_teardown(void)
Definition: test_dns.c:13

Referenced by main().

◆ dns_teardown()

static void dns_teardown ( void  )
static

Definition at line 13 of file test_dns.c.

14{
15}

Referenced by dns_suite().

◆ START_TEST()

START_TEST ( test_dns_set_get_server  )

Definition at line 19 of file test_dns.c.

20{
21 int n;
23
24 for (n = 0; n < 256; n++) {
25 u8_t i = (u8_t)n;
27 /* Should return a zeroed address for any index */
28 fail_unless(dns_getserver(i));
29 fail_unless(ip_addr_isany(dns_getserver(i)));
30
31 /* Should accept setting address for any index, and ignore if out of range */
32 IP_ADDR4(&server, 10, 0, 0, i);
33 dns_setserver(i, &server);
34 fail_unless(dns_getserver(i));
35 if (i < DNS_MAX_SERVERS) {
36 fail_unless(ip_addr_eq(dns_getserver(i), &server) == 1);
37 } else {
38 fail_unless(ip_addr_isany(dns_getserver(i)));
39 }
40 }
41}
GLdouble n
Definition: glext.h:7729
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
uint8_t u8_t
Definition: arch.h:125
#define LWIP_UNUSED_ARG(x)
Definition: arch.h:373
#define DNS_MAX_SERVERS
Definition: opt.h:1153
#define ip_addr_isany(ipaddr)
Definition: ip_addr.h:377
#define ip_addr_eq(addr1, addr2)
Definition: ip_addr.h:374
ip6_addr_t ip_addr_t
Definition: ip_addr.h:344
static rfbScreenInfoPtr server
Definition: vnc.c:74