mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 05:23:33 +08:00
[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:
parent
2fa0436372
commit
d066dae7d9
@ -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)
|
||||
|
10
modules/rostests/apitests/imm32/CMakeLists.txt
Normal file
10
modules/rostests/apitests/imm32/CMakeLists.txt
Normal 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)
|
33
modules/rostests/apitests/imm32/imcc.c
Normal file
33
modules/rostests/apitests/imm32/imcc.c
Normal 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);
|
||||
}
|
11
modules/rostests/apitests/imm32/testlist.c
Normal file
11
modules/rostests/apitests/imm32/testlist.c
Normal 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 }
|
||||
};
|
Loading…
Reference in New Issue
Block a user