ReactOS 0.4.15-dev-7924-g5949c20
FsRtlExpression.c File Reference
#include <kmt_test.h>
#include <debug.h>
Include dependency graph for FsRtlExpression.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

static VOID FsRtlIsNameInExpressionTest ()
 
static VOID FsRtlIsDbcsInExpressionTest ()
 
 START_TEST (FsRtlExpression)
 

Variables

struct {
   PCWSTR   Expression
 
   PCWSTR   Name
 
   BOOLEAN   IgnoreCase
 
   BOOLEAN   AssertsInChecked
 
   BOOLEAN   Expected
 
Tests []
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file FsRtlExpression.c.

Function Documentation

◆ FsRtlIsDbcsInExpressionTest()

static VOID FsRtlIsDbcsInExpressionTest ( )
static

Definition at line 205 of file FsRtlExpression.c.

206{
207 ULONG i;
208 for (i = 0; i < sizeof(Tests) / sizeof(Tests[0]); i++)
209 {
210 BOOLEAN TestResult;
211 UNICODE_STRING UExpression;
212 UNICODE_STRING UName;
215
216 /* Don't run Tests which are known to assert in checked builds */
218 continue;
219
220 /* Ignore Tests flagged IgnoreCase==TRUE to avoid duplicated testing */
221 if (Tests[i].IgnoreCase)
222 continue;
223
224 RtlInitUnicodeString(&UExpression, Tests[i].Expression);
226
229
230 TestResult = FsRtlIsDbcsInExpression(&Expression, &Name);
231
232 ok(TestResult == Tests[i].Expected, "FsRtlIsDbcsInExpression(%Z,%Z): Expected %s, got %s\n",
233 &Expression, &Name, Tests[i].Expected ? "TRUE" : "FALSE", TestResult ? "TRUE" : "FALSE");
234
237 }
238}
BOOLEAN AssertsInChecked
BOOLEAN Expected
BOOLEAN IgnoreCase
PCWSTR Expression
PCWSTR Name
struct @1621 Tests[]
unsigned char BOOLEAN
#define ok(value,...)
Definition: atltest.h:57
BOOLEAN NTAPI FsRtlIsDbcsInExpression(IN PANSI_STRING Expression, IN PANSI_STRING Name)
Definition: dbcsname.c:160
#define TRUE
Definition: types.h:120
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
BOOLEAN KmtIsCheckedBuild
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
uint32_t ULONG
Definition: typedefs.h:59

Referenced by START_TEST().

◆ FsRtlIsNameInExpressionTest()

static VOID FsRtlIsNameInExpressionTest ( )
static

Definition at line 184 of file FsRtlExpression.c.

185{
186 ULONG i;
187 for (i = 0; i < sizeof(Tests) / sizeof(Tests[0]); i++)
188 {
189 BOOLEAN TestResult;
192
195
197
198 ok(TestResult == Tests[i].Expected, "FsRtlIsNameInExpression(%wZ,%wZ,%s,NULL): Expected %s, got %s\n",
199 &Expression, &Name, Tests[i].IgnoreCase ? "TRUE" : "FALSE", Tests[i].Expected ? "TRUE" : "FALSE", TestResult ? "TRUE" : "FALSE");
200 }
201
202 /* TODO: test UpcaseTable */
203}
#define NULL
Definition: types.h:112
BOOLEAN NTAPI FsRtlIsNameInExpression(IN PUNICODE_STRING Expression, IN PUNICODE_STRING Name, IN BOOLEAN IgnoreCase, IN PWCHAR UpcaseTable OPTIONAL)
Definition: name.c:514

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( FsRtlExpression  )

Definition at line 240 of file FsRtlExpression.c.

241{
244}
static VOID FsRtlIsDbcsInExpressionTest()
static VOID FsRtlIsNameInExpressionTest()

Variable Documentation

◆ AssertsInChecked

BOOLEAN AssertsInChecked

Definition at line 20 of file FsRtlExpression.c.

Referenced by FsRtlIsDbcsInExpressionTest().

◆ Expected

◆ Expression

◆ IgnoreCase

BOOLEAN IgnoreCase

Definition at line 18 of file FsRtlExpression.c.

Referenced by FsRtlIsDbcsInExpressionTest(), and FsRtlIsNameInExpressionTest().

◆ Name

◆ 

struct { ... } Tests[]