ReactOS  0.4.15-dev-1206-g731eddf
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;
94  NTSTATUS res;
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 }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define StartSeh()
Definition: _sntprintf.h:16
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
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:48
#define d
Definition: ke_i.h:81
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define for
Definition: utility.h:88
GLenum GLsizei len
Definition: glext.h:6722
GLuint in
Definition: glext.h:9616
#define ok(value,...)
Definition: atltest.h:57
const char * expected_result
Definition: mimeole.c:1468
GLuint res
Definition: glext.h:9613
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
return STATUS_SUCCESS
Definition: btrfs.c:3014
GLuint64EXT * result
Definition: glext.h:11304
BOOL expected
Definition: store.c:2063
NTSYSAPI NTSTATUS NTAPI RtlGetLengthWithoutTrailingPathSeperators(_Reserved_ ULONG Flags, _In_ PCUNICODE_STRING PathString, _Out_ PULONG Length)
#define EndSeh(ExpectedStatus)
Definition: _sntprintf.h:17
static const struct stream_output expected_output[]
Definition: msacm.c:1056
struct test_data test_entries[]

Variable Documentation

◆ num_tests

◆ test_entries

struct test_data test_entries[]

Referenced by START_TEST().