mirror of
https://github.com/reactos/reactos.git
synced 2024-11-07 15:10:53 +00:00
5666d93992
Fix broken test. svn path=/trunk/; revision=57208
31 lines
936 B
C
31 lines
936 B
C
/*
|
|
* PROJECT: ReactOS api tests
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* PURPOSE: Test for _vscprintf
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <wine/test.h>
|
|
#include <tchar.h>
|
|
#include <errno.h>
|
|
|
|
static void call_varargs(int expected_ret, LPCWSTR formatString, ...)
|
|
{
|
|
va_list args;
|
|
int ret;
|
|
/* Test the basic functionality */
|
|
va_start(args, formatString);
|
|
ret = _vscwprintf(formatString, args);
|
|
ok(expected_ret == ret, "expected %i, got %i.\n", expected_ret, ret);
|
|
}
|
|
|
|
START_TEST(_vscwprintf)
|
|
{
|
|
/* Lesson of the day: don't mix wide and ansi char */
|
|
/* Lesson of the week: don't ignore the lesson of the day */
|
|
call_varargs(12, L"%hs world!", "hello");
|
|
call_varargs(12, L"%s world!", L"hello");
|
|
call_varargs(17, L"Jack ate %u pies", 100);
|
|
/* Do not test NULL argument. That is verified to SEGV on a */
|
|
/* release-build with VC10 and MS' msvcrt. */
|
|
}
|