ReactOS 0.4.17-dev-573-g8315b8c
RtlIsNameInExpression.c File Reference
#include "precomp.h"
Include dependency graph for RtlIsNameInExpression.c:

Go to the source code of this file.

Classes

struct  _RtlExpressionTest
 

Macros

#define RtlIsNameInExpressionOk(Test, TestResult)
 

Typedefs

typedef struct _RtlExpressionTest RtlExpressionTest
 

Functions

static BOOLEAN (NTAPI *pRtlIsNameInExpression)(_In_ PUNICODE_STRING Expression
 
static void RtlIsNameInExpressionTest ()
 
 START_TEST (RtlIsNameInExpression)
 

Variables

static _In_ PUNICODE_STRING Name
 
static _In_ PUNICODE_STRING _In_ BOOLEAN IgnoreCase
 
static _In_ PUNICODE_STRING _In_ BOOLEAN _In_opt_ PWCH UpcaseTable
 
static const WCHAR CustomUpcaseTable1 [128]
 
RtlExpressionTest RtlExpressionTests []
 

Macro Definition Documentation

◆ RtlIsNameInExpressionOk

#define RtlIsNameInExpressionOk (   Test,
  TestResult 
)
Value:
do { ok(TestResult == Test.Expected, \
"RtlIsNameInExpression(%S, %S, %s, %s): Expected %s, got %s\n", \
Test.Expression, \
Test.Name, \
Test.IgnoreCase ? "TRUE" : "FALSE", \
Test.UpcaseTable ? "NOT NULL" : "NULL", \
Test.Expected ? "TRUE" : "FALSE", \
TestResult ? "TRUE" : "FALSE"); \
} while(0)
#define ok(value,...)
Definition: atltest.h:57

Definition at line 270 of file RtlIsNameInExpression.c.

Typedef Documentation

◆ RtlExpressionTest

Function Documentation

◆ BOOLEAN()

static BOOLEAN ( NTAPI pRtlIsNameInExpression)
static

◆ RtlIsNameInExpressionTest()

static void RtlIsNameInExpressionTest ( )
static

Definition at line 281 of file RtlIsNameInExpression.c.

282{
283 if (!pRtlIsNameInExpression)
284 {
285 skip("RtlIsNameInExpression unavailable\n");
286 return;
287 }
288
289 for (ULONG i = 0; i < ARRAYSIZE(RtlExpressionTests); i++)
290 {
293
296
297 Result = pRtlIsNameInExpression(&Expression, &Name, RtlExpressionTests[i].IgnoreCase,
300
302 {
303 /* System upcase table tests should also pass with a normal upcase table. */
304 Result = pRtlIsNameInExpression(&Expression, &Name, RtlExpressionTests[i].IgnoreCase, (PWCH)UpcaseTable);
306 }
307 }
308}
PCWSTR Expression
static _In_ PUNICODE_STRING _In_ BOOLEAN IgnoreCase
#define RtlIsNameInExpressionOk(Test, TestResult)
RtlExpressionTest RtlExpressionTests[]
static _In_ PUNICODE_STRING Name
static _In_ PUNICODE_STRING _In_ BOOLEAN _In_opt_ PWCH UpcaseTable
unsigned char BOOLEAN
Definition: actypes.h:127
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
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
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
WCHAR * PWCH
Definition: ntbasedef.h:422
uint32_t ULONG
Definition: typedefs.h:59
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( RtlIsNameInExpression  )

Definition at line 310 of file RtlIsNameInExpression.c.

311{
312 HMODULE hdll = GetModuleHandleW(L"ntdll.dll");
313 pRtlIsNameInExpression = (PVOID)GetProcAddress(hdll, "RtlIsNameInExpression");
314 if (!pRtlIsNameInExpression)
315 {
316 hdll = GetModuleHandleW(L"ntdll_vista.dll");
317 pRtlIsNameInExpression = (PVOID)GetProcAddress(hdll, "RtlIsNameInExpression");
318 }
320}
static void RtlIsNameInExpressionTest()
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
#define L(x)
Definition: resources.c:13
static PVOID hdll
Definition: shimdbg.c:126
void * PVOID
Definition: typedefs.h:50

Variable Documentation

◆ CustomUpcaseTable1

const WCHAR CustomUpcaseTable1[128]
static
Initial value:
=
{
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
' ' ,'!' ,'"' ,'#' ,'$' ,'%' ,'&' ,'\'','(' ,')' ,'*' ,'+' ,',' ,'-' ,'.' ,'/' ,
'0' ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'8' ,'9' ,':' ,';' ,'<' ,'=' ,'>' ,'?' ,
'@' ,'A' ,'B' ,'C' ,'D' ,'E' ,'F' ,'G' ,'H' ,'I' ,'J' ,'K' ,'L' ,'M' ,'N' ,'O' ,
'P' ,'Q' ,'R' ,'S' ,'T' ,'U' ,'V' ,'W' ,'X' ,'Y' ,'Z' ,'[' ,'\\',']' ,'^' ,'_' ,
'`' ,'B' ,'C' ,'D' ,'E' ,'F' ,'G' ,'H' ,'I' ,'J' ,'K' ,'L' ,'M' ,'N' ,'O' ,'P' ,
'Q' ,'R' ,'S' ,'T' ,'U' ,'V' ,'W' ,'X' ,'Y' ,'Z' ,'A' ,'{' ,'|' ,'}' ,'~' ,0x7F,
}

Definition at line 52 of file RtlIsNameInExpression.c.

◆ IgnoreCase

Definition at line 14 of file RtlIsNameInExpression.c.

Referenced by RtlIsNameInExpressionTest().

◆ Name

Definition at line 13 of file RtlIsNameInExpression.c.

Referenced by RtlIsNameInExpressionTest().

◆ RtlExpressionTests

RtlExpressionTest RtlExpressionTests[]

Definition at line 73 of file RtlIsNameInExpression.c.

Referenced by RtlIsNameInExpressionTest().

◆ UpcaseTable

static const WCHAR UpcaseTable
Initial value:
=
{
0x00,0x01,0x02,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