diff --git a/rostests/apitests/kernel32/CMakeLists.txt b/rostests/apitests/kernel32/CMakeLists.txt index a8fa0dad71e..1ea96f65ddc 100644 --- a/rostests/apitests/kernel32/CMakeLists.txt +++ b/rostests/apitests/kernel32/CMakeLists.txt @@ -6,6 +6,7 @@ list(APPEND SOURCE GetDriveType.c GetModuleFileName.c lstrcpynW.c + MultiByteToWideChar.c SetCurrentDirectory.c SetUnhandledExceptionFilter.c testlist.c) diff --git a/rostests/apitests/kernel32/MultiByteToWideChar.c b/rostests/apitests/kernel32/MultiByteToWideChar.c new file mode 100644 index 00000000000..96fc8bd07b7 --- /dev/null +++ b/rostests/apitests/kernel32/MultiByteToWideChar.c @@ -0,0 +1,22 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for MultiByteToWideChar + * PROGRAMMER: Mike "tamlin" Nordell + */ + +#include +#include +#include + + +START_TEST(MultiByteToWideChar) +{ + int ret; + + ret = MultiByteToWideChar(CP_UTF8, 0, "a", sizeof("a"), 0, 0); + ok(ret == 2, "ret should be 2, is %d\n", ret); + + ret = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, "a", sizeof("a"), 0, 0); + ok(ret == 2, "ret should be 2, is %d\n", ret); +} diff --git a/rostests/apitests/kernel32/testlist.c b/rostests/apitests/kernel32/testlist.c index f29e08f33ba..a0b5d034802 100644 --- a/rostests/apitests/kernel32/testlist.c +++ b/rostests/apitests/kernel32/testlist.c @@ -9,6 +9,7 @@ extern void func_GetCurrentDirectory(void); extern void func_GetDriveType(void); extern void func_GetModuleFileName(void); extern void func_lstrcpynW(void); +extern void func_MultiByteToWideChar(void); extern void func_SetCurrentDirectory(void); extern void func_SetUnhandledExceptionFilter(void); @@ -18,6 +19,7 @@ const struct test winetest_testlist[] = { "GetDriveType", func_GetDriveType }, { "GetModuleFileName", func_GetModuleFileName }, { "lstrcpynW", func_lstrcpynW }, + { "MultiByteToWideChar", func_MultiByteToWideChar }, { "SetCurrentDirectory", func_SetCurrentDirectory }, { "SetUnhandledExceptionFilter", func_SetUnhandledExceptionFilter},