ReactOS  0.4.15-dev-1374-g8d3e80e
CheckEscapes.cpp File Reference
#include "shelltest.h"
Include dependency graph for CheckEscapes.cpp:

Go to the source code of this file.

Classes

struct  TESTENTRYA
 
struct  TESTENTRYW
 

Typedefs

typedef void(WINAPIFN_CheckEscapesA) (LPSTR string, DWORD len)
 
typedef void(WINAPIFN_CheckEscapesW) (LPWSTR string, DWORD len)
 
typedef struct TESTENTRYA TESTENTRYA
 
typedef struct TESTENTRYW TESTENTRYW
 

Functions

static void JustDoIt (void)
 
 START_TEST (CheckEscapes)
 

Variables

static FN_CheckEscapesA s_pCheckEscapesA
 
static FN_CheckEscapesW s_pCheckEscapesW
 
static const TESTENTRYA s_entriesA []
 
static const TESTENTRYW s_entriesW []
 

Typedef Documentation

◆ FN_CheckEscapesA

typedef void(WINAPI * FN_CheckEscapesA) (LPSTR string, DWORD len)

Definition at line 9 of file CheckEscapes.cpp.

◆ FN_CheckEscapesW

typedef void(WINAPI * FN_CheckEscapesW) (LPWSTR string, DWORD len)

Definition at line 10 of file CheckEscapes.cpp.

◆ TESTENTRYA

◆ TESTENTRYW

Function Documentation

◆ JustDoIt()

static void JustDoIt ( void  )
static

Definition at line 137 of file CheckEscapes.cpp.

138 {
139  SIZE_T i, count;
140  CHAR bufA[MAX_PATH];
141  WCHAR bufW[MAX_PATH];
142 
144  for (i = 0; i < count; ++i)
145  {
146  lstrcpynA(bufA, s_entriesA[i].input, _countof(bufA));
148  ok(lstrcmpA(bufA, s_entriesA[i].output) == 0,
149  "Line %d: output expected '%s' vs got '%s'\n",
150  s_entriesA[i].lineno, s_entriesA[i].output, bufA);
151  }
152 
154  for (i = 0; i < count; ++i)
155  {
156  lstrcpynW(bufW, s_entriesW[i].input, _countof(bufW));
158  ok(lstrcmpW(bufW, s_entriesW[i].output) == 0,
159  "Line %d: output expected '%ls' vs got '%ls'\n",
160  s_entriesW[i].lineno, s_entriesW[i].output, bufW);
161  }
162 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
GLuint GLuint GLsizei count
Definition: gl.h:1545
char CHAR
Definition: xmlstorage.h:175
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
#define lstrcpynW
Definition: compat.h:597
static const TESTENTRYA s_entriesA[]
static const TESTENTRYW s_entriesW[]
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
GLenum GLsizei len
Definition: glext.h:6722
ULONG_PTR SIZE_T
Definition: typedefs.h:80
GLenum GLenum GLenum input
Definition: glext.h:9031
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
#define ok(value,...)
Definition: atltest.h:57
#define lstrcpynA
Definition: compat.h:610
static FN_CheckEscapesW s_pCheckEscapesW
static FN_CheckEscapesA s_pCheckEscapesA

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( CheckEscapes  )

Definition at line 164 of file CheckEscapes.cpp.

165 {
166  HINSTANCE hShell32 = GetModuleHandleA("shell32");
170  {
171  JustDoIt();
172  }
173  else
174  {
175  skip("There is no CheckEscapesA/W\n");
176  }
177 }
static void JustDoIt(void)
void(WINAPI * FN_CheckEscapesA)(LPSTR string, DWORD len)
Definition: CheckEscapes.cpp:9
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
#define skip(...)
Definition: atltest.h:64
#define GetProcAddress(x, y)
Definition: compat.h:612
static FN_CheckEscapesW s_pCheckEscapesW
void(WINAPI * FN_CheckEscapesW)(LPWSTR string, DWORD len)
static HMODULE hShell32
Definition: string.c:34
static FN_CheckEscapesA s_pCheckEscapesA

Variable Documentation

◆ s_entriesA

const TESTENTRYA s_entriesA[]
static

Definition at line 31 of file CheckEscapes.cpp.

Referenced by JustDoIt().

◆ s_entriesW

const TESTENTRYW s_entriesW[]
static

Definition at line 84 of file CheckEscapes.cpp.

Referenced by JustDoIt().

◆ s_pCheckEscapesA

FN_CheckEscapesA s_pCheckEscapesA
static

Definition at line 12 of file CheckEscapes.cpp.

Referenced by JustDoIt(), and START_TEST().

◆ s_pCheckEscapesW

FN_CheckEscapesW s_pCheckEscapesW
static

Definition at line 13 of file CheckEscapes.cpp.

Referenced by JustDoIt(), and START_TEST().