ReactOS  0.4.15-dev-1054-gd029a62
ipaddress.c File Reference
#include <windows.h>
#include <commctrl.h>
#include "wine/test.h"
#include "v6util.h"
Include dependency graph for ipaddress.c:

Go to the source code of this file.

Macros

#define expect(expected, got)   ok(expected == got, "expected %d, got %d\n", expected,got)
 

Functions

static HWND create_ipaddress_control (void)
 
static void test_get_set_text (void)
 
 START_TEST (ipaddress)
 

Macro Definition Documentation

◆ expect

#define expect (   expected,
  got 
)    ok(expected == got, "expected %d, got %d\n", expected,got)

Definition at line 27 of file ipaddress.c.

Function Documentation

◆ create_ipaddress_control()

static HWND create_ipaddress_control ( void  )
static

Definition at line 29 of file ipaddress.c.

30 {
31  HWND handle;
32 
34  WS_BORDER|WS_VISIBLE, 0, 0, 0, 0,
35  NULL, NULL, NULL, NULL);
36  return handle;
37 }
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
#define WC_IPADDRESSA
Definition: commctrl.h:4469
smooth NULL
Definition: ftsmooth.c:416
#define WS_BORDER
Definition: pedump.c:625
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define WS_VISIBLE
Definition: pedump.c:620

Referenced by test_get_set_text().

◆ START_TEST()

START_TEST ( ipaddress  )

Definition at line 65 of file ipaddress.c.

66 {
68  HANDLE ctxt;
69 
71 
72  if (!load_v6_module(&cookie, &ctxt))
73  return;
74 
76 
77  unload_v6_module(cookie, ctxt);
78 }
static void test_get_set_text(void)
Definition: ipaddress.c:39
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
Definition: v6util.h:63
uint32_t ULONG_PTR
Definition: typedefs.h:65
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
Definition: v6util.h:71
Definition: cookie.c:33

◆ test_get_set_text()

static void test_get_set_text ( void  )
static

Definition at line 39 of file ipaddress.c.

40 {
41  HWND hwnd;
42  CHAR ip[16];
43  INT r;
44 
46  if (!hwnd)
47  {
48  win_skip("IPAddress control not implemented\n");
49  return;
50  }
51 
52  /* check text just after creation */
54  expect(7, r);
55  ok(strcmp(ip, "0.0.0.0") == 0, "Expected null IP address, got %s\n", ip);
56 
57  SendMessageA(hwnd, IPM_SETADDRESS, 0, MAKEIPADDRESS(127, 0, 0, 1));
59  expect(9, r);
60  ok(strcmp(ip, "127.0.0.1") == 0, "Expected 127.0.0.1, got %s\n", ip);
61 
63 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1330
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
char CHAR
Definition: xmlstorage.h:175
BOOL WINAPI DestroyWindow(_In_ HWND)
int32_t INT
Definition: typedefs.h:58
#define IPM_SETADDRESS
Definition: commctrl.h:4462
Definition: dhcpd.h:61
#define expect(expected, got)
Definition: ipaddress.c:27
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
#define MAKEIPADDRESS(b1, b2, b3, b4)
Definition: commctrl.h:4482
static HWND create_ipaddress_control(void)
Definition: ipaddress.c:29
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define win_skip
Definition: test.h:149

Referenced by START_TEST().