mirror of
https://github.com/reactos/reactos.git
synced 2025-04-18 03:34:11 +00:00
[APITESTS/CRT]
- Test errno value on failure svn path=/trunk/; revision=56930
This commit is contained in:
parent
9c54cdba31
commit
5cc65e64c7
4 changed files with 24 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <wine/test.h>
|
||||
#include <tchar.h>
|
||||
#include <errno.h>
|
||||
|
||||
static void call_varargs(int expected_ret, LPCSTR formatString, ...)
|
||||
{
|
||||
|
@ -26,4 +27,5 @@ START_TEST(_vscprintf)
|
|||
call_varargs(11, "%u cookies", 100);
|
||||
/* Test NULL argument */
|
||||
call_varargs(-1, NULL);
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <wine/test.h>
|
||||
#include <tchar.h>
|
||||
#include <errno.h>
|
||||
|
||||
static void call_varargs(int expected_ret, LPCWSTR formatString, ...)
|
||||
{
|
||||
|
@ -27,4 +28,7 @@ START_TEST(_vscwprintf)
|
|||
|
||||
/* Test NULL argument */
|
||||
call_varargs(-1, NULL);
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -40,6 +40,9 @@ START_TEST(_vsnprintf)
|
|||
EndSeh(STATUS_ACCESS_VIOLATION);
|
||||
#else
|
||||
EndSeh(STATUS_SUCCESS);
|
||||
#endif
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
/* This one is no better */
|
||||
StartSeh()
|
||||
|
@ -48,6 +51,9 @@ START_TEST(_vsnprintf)
|
|||
EndSeh(STATUS_ACCESS_VIOLATION);
|
||||
#else
|
||||
EndSeh(STATUS_SUCCESS);
|
||||
#endif
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
/* One more NULL checks */
|
||||
StartSeh()
|
||||
|
@ -57,4 +63,7 @@ START_TEST(_vsnprintf)
|
|||
#else
|
||||
EndSeh(STATUS_SUCCESS);
|
||||
#endif
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -40,6 +40,9 @@ START_TEST(_vsnwprintf)
|
|||
EndSeh(STATUS_ACCESS_VIOLATION);
|
||||
#else
|
||||
EndSeh(STATUS_SUCCESS);
|
||||
#endif
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
/* This one is no better */
|
||||
StartSeh()
|
||||
|
@ -48,6 +51,9 @@ START_TEST(_vsnwprintf)
|
|||
EndSeh(STATUS_ACCESS_VIOLATION);
|
||||
#else
|
||||
EndSeh(STATUS_SUCCESS);
|
||||
#endif
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
/* One more NULL checks */
|
||||
StartSeh()
|
||||
|
@ -57,4 +63,7 @@ START_TEST(_vsnwprintf)
|
|||
#else
|
||||
EndSeh(STATUS_SUCCESS);
|
||||
#endif
|
||||
#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */
|
||||
ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue