ReactOS  0.4.14-dev-554-g2f8d847
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);
225  RtlInitUnicodeString(&UName, Tests[i].Name);
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 }
PCWSTR Expression
#define TRUE
Definition: types.h:120
BOOLEAN KmtIsCheckedBuild
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 AssertsInChecked
unsigned char BOOLEAN
struct @1587 Tests[]
BOOLEAN NTAPI FsRtlIsDbcsInExpression(IN PANSI_STRING Expression, IN PANSI_STRING Name)
Definition: dbcsname.c:160
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
PCWSTR Name
NTSYSAPI VOID NTAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
#define ok(value,...)
Definition: atltest.h:57
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
BOOLEAN Expected
BOOLEAN IgnoreCase

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 }
PCWSTR Expression
BOOLEAN NTAPI FsRtlIsNameInExpression(IN PUNICODE_STRING Expression, IN PUNICODE_STRING Name, IN BOOLEAN IgnoreCase, IN PWCHAR UpcaseTable OPTIONAL)
Definition: name.c:514
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
unsigned char BOOLEAN
struct @1587 Tests[]
smooth NULL
Definition: ftsmooth.c:416
PCWSTR Name
#define ok(value,...)
Definition: atltest.h:57
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
BOOLEAN Expected
BOOLEAN IgnoreCase

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( FsRtlExpression  )

Definition at line 240 of file FsRtlExpression.c.

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

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

◆ Tests

struct { ... } Tests[]