[IMM32_APITEST] Add imm32_apitest test program (#3810)

Add a test program for imm32.dll as a proof of concept. CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2021-07-10 00:05:43 +09:00 committed by GitHub
parent 2fa0436372
commit d066dae7d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 0 deletions

View File

@ -23,6 +23,7 @@ add_subdirectory(dnsapi)
add_subdirectory(fontext)
add_subdirectory(gdi32)
add_subdirectory(gditools)
add_subdirectory(imm32)
add_subdirectory(iphlpapi)
add_subdirectory(kernel32)
add_subdirectory(loadconfig)

View File

@ -0,0 +1,10 @@
list(APPEND SOURCE
imcc.c
testlist.c)
add_executable(imm32_apitest ${SOURCE})
target_link_libraries(imm32_apitest wine ${PSEH_LIB})
set_module_type(imm32_apitest win32cui)
add_importlibs(imm32_apitest imm32 msvcrt kernel32 ntdll)
add_rostests_file(TARGET imm32_apitest)

View File

@ -0,0 +1,33 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Test for imm32 IMCC
* COPYRIGHT: Copyright 2021 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#include <ntstatus.h>
#define WIN32_NO_STATUS
#include <windows.h>
#include <imm.h>
#include "wine/test.h"
START_TEST(imcc)
{
HIMCC hImcc;
DWORD i;
for (i = 0; i < 4; ++i)
{
hImcc = ImmCreateIMCC(i);
ok_long(LocalSize(hImcc), 4);
ok_long(ImmGetIMCCSize(hImcc), 4);
ok_long(ImmGetIMCCLockCount(hImcc), (LocalFlags(hImcc) & LMEM_LOCKCOUNT));
ImmDestroyIMCC(hImcc);
}
hImcc = ImmCreateIMCC(5);
ok_long(LocalSize(hImcc), 5);
ok_long(ImmGetIMCCSize(hImcc), 5);
ok_long(ImmGetIMCCLockCount(hImcc), (LocalFlags(hImcc) & LMEM_LOCKCOUNT));
ImmDestroyIMCC(hImcc);
}

View File

@ -0,0 +1,11 @@
#define STANDALONE
#include <wine/test.h>
extern void func_imcc(void);
const struct test winetest_testlist[] =
{
{ "imcc", func_imcc },
{ 0, 0 }
};