ReactOS 0.4.15-dev-7953-g1f49173
RtlGetLengthWithoutTrailingPathSeperators.c File Reference
#include "precomp.h"
Include dependency graph for RtlGetLengthWithoutTrailingPathSeperators.c:

Go to the source code of this file.

Classes

struct  test_data
 

Macros

#define MakeTestEntry_Success(str, expect)    { str, expect, STATUS_SUCCESS, __LINE__ }
 

Functions

 START_TEST (RtlGetLengthWithoutTrailingPathSeperators)
 

Variables

struct test_data test_entries []
 
int num_tests = sizeof(test_entries) / sizeof(struct test_data)
 

Macro Definition Documentation

◆ MakeTestEntry_Success

#define MakeTestEntry_Success (   str,
  expect 
)     { str, expect, STATUS_SUCCESS, __LINE__ }

Definition at line 10 of file RtlGetLengthWithoutTrailingPathSeperators.c.

Function Documentation

◆ START_TEST()

Definition at line 90 of file RtlGetLengthWithoutTrailingPathSeperators.c.

91{
92 ULONG len;
95 int i;
96
97 struct test_data * pentry = test_entries;
98
99 for(i = 0; i < num_tests; i++, pentry++)
100 {
102 &str, pentry->input);
103
104 len = 0xDEADBEEF;
105
106 StartSeh()
109
110 ok(res == pentry->expected_result,
111 "Unexpected result 0x%08lx (expected 0x%08lx) in [%d:%d]\n",
112 res, pentry->expected_result,
113 i, pentry->line);
114 ok(len == pentry->expected_output,
115 "Unexpected length %lu (expected %lu) in [%d:%d]\n",
116 len, pentry->expected_output,
117 i, pentry->line);
118 }
119
120 // Invalid parameters
121
122 len = 0xDEADBEEF;
123
124 StartSeh()
127
129 "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
130 res);
131 ok(len == 0,
132 "Unexpected length %08lx (expected 0)\n",
133 len);
134
135 StartSeh()
138
140 "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
141 res);
142
143 StartSeh()
146
148 "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
149 res);
150
151 for(i = 0; i < 32; i++)
152 {
153 len = 0xDEADBEEF;
154
155 StartSeh()
158
160 "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
161 res);
162
163 ok(len == 0,
164 "Unexpected length %08lx (expected 0)\n",
165 len);
166 }
167
168 len = 0xDEADBEEF;
169
170 StartSeh()
173
175 "Unexpected result 0x%08lx (expected STATUS_INVALID_PARAMETER)\n",
176 res);
177
178 ok(len == 0,
179 "Unexpected length %08lx (expected 0)\n",
180 len);
181}
struct test_data test_entries[]
#define StartSeh()
Definition: _sntprintf.h:16
#define EndSeh(ExpectedStatus)
Definition: _sntprintf.h:17
#define ok(value,...)
Definition: atltest.h:57
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble n
Definition: glext.h:7729
GLuint res
Definition: glext.h:9613
GLuint in
Definition: glext.h:9616
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLsizei len
Definition: glext.h:6722
GLuint64EXT * result
Definition: glext.h:11304
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 d
Definition: ke_i.h:81
#define for
Definition: utility.h:88
BOOL expected
Definition: store.c:2063
const char * expected_result
Definition: mimeole.c:1468
static const struct stream_output expected_output[]
Definition: msacm.c:1056
NTSYSAPI NTSTATUS NTAPI RtlGetLengthWithoutTrailingPathSeperators(_Reserved_ ULONG Flags, _In_ PCUNICODE_STRING PathString, _Out_ PULONG Length)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
const WCHAR * str
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: parser.c:49
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

Variable Documentation

◆ num_tests

◆ test_entries

struct test_data test_entries[]