ReactOS 0.4.16-dev-1983-g1a17364
_stricmp.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS API tests
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Tests for _stricmp
5 * COPYRIGHT: Copyright 2025 Timo Kreuzer (timo.kreuzer@reactos.org)
6 */
7
8#define WIN32_NO_STATUS
9#include <apitest.h>
10#include <pseh/pseh2.h>
11#include <ndk/umtypes.h>
12
13typedef int (__cdecl *PFN_stricmp)(const char* _String1, const char* _String2);
15
16static BOOL Init(void)
17{
20 ok(p_stricmp != NULL, "Failed to load _stricmp from %s\n", TEST_DLL_NAME);
21 return (p_stricmp != NULL);
22}
23
25{
26 int result;
27
28#ifndef TEST_STATIC_CRT
29 if (!Init())
30 {
31 skip("Skipping tests, because _stricmp is not available\n");
32 return;
33 }
34#endif
35
36 StartSeh()
37 result = p_stricmp("a", NULL);
39#ifdef TEST_NTDLL
41#else
43#endif
44
45 StartSeh()
46 result = p_stricmp(NULL, "a");
48#ifdef TEST_NTDLL
50#else
52#endif
53}
static PFN_stricmp p_stricmp
Definition: _stricmp.c:14
int(__cdecl * PFN_stricmp)(const char *_String1, const char *_String2)
Definition: _stricmp.c:13
static BOOL Init(void)
Definition: _stricmp.c:16
#define __cdecl
Definition: accygwin.h:79
#define GetNTVersion()
Definition: apitest.h:17
#define StartSeh()
Definition: apitest.h:93
#define EndSeh(ExpectedStatus)
Definition: apitest.h:99
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
#define _stricmp
Definition: cat.c:22
_In_z_ wchar_t const * _String2
#define NULL
Definition: types.h:112
#define GetProcAddress(x, y)
Definition: compat.h:753
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned int BOOL
Definition: ntddk_ex.h:94
#define STATUS_ACCESS_VIOLATION
GLuint64EXT * result
Definition: glext.h:11304
#define TEST_DLL_NAME
Definition: wsprintf.c:3
#define is_reactos()
Definition: test.h:1041
#define _WIN32_WINNT_VISTA
Definition: sdkddkver.h:25
#define STATUS_SUCCESS
Definition: shellext.h:65
static PVOID hdll
Definition: shimdbg.c:126
#define MAXLONG
Definition: umtypes.h:116