ReactOS  0.4.14-dev-614-gbfd8a84
_vscwprintf.c File Reference
#include <apitest.h>
#include <stdio.h>
#include <tchar.h>
#include <errno.h>
Include dependency graph for _vscwprintf.c:

Go to the source code of this file.

Functions

static void call_varargs (int expected_ret, LPCWSTR formatString,...)
 
 START_TEST (_vscwprintf)
 

Function Documentation

◆ call_varargs()

static void call_varargs ( int  expected_ret,
LPCWSTR  formatString,
  ... 
)
static

Definition at line 13 of file _vscwprintf.c.

14 {
15  va_list args;
16  int ret;
17  /* Test the basic functionality */
18  va_start(args, formatString);
19  ret = _vscwprintf(formatString, args);
20  va_end(args);
21  ok(expected_ret == ret, "expected %i, got %i.\n", expected_ret, ret);
22 }
Definition: match.c:390
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
int ret
#define ok(value,...)
Definition: atltest.h:57
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define args
Definition: format.c:66
int __cdecl _vscwprintf(const wchar_t *format, va_list argptr)
Definition: _vscwprintf.c:15

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( _vscwprintf  )

Definition at line 24 of file _vscwprintf.c.

25 {
26  /* Lesson of the day: don't mix wide and ansi char */
27  /* Lesson of the week: don't ignore the lesson of the day */
28  call_varargs(12, L"%hs world!", "hello");
29  call_varargs(12, L"%s world!", L"hello");
30  call_varargs(17, L"Jack ate %u pies", 100);
31  /* Do not test NULL argument. That is verified to SEGV on a */
32  /* release-build with VC10 and MS' msvcrt. */
33 }
static void call_varargs(int expected_ret, LPCWSTR formatString,...)
Definition: _vscwprintf.c:13
static const WCHAR L[]
Definition: oid.c:1250