Test for MultiByteToWideChar added. Still needs alot fleshing out.
authorMike Nordell <tamlin@algonet.se>
Wed, 10 Oct 2012 19:10:49 +0000 (19:10 +0000)
committerMike Nordell <tamlin@algonet.se>
Wed, 10 Oct 2012 19:10:49 +0000 (19:10 +0000)
svn path=/trunk/; revision=57529

rostests/apitests/kernel32/CMakeLists.txt
rostests/apitests/kernel32/MultiByteToWideChar.c [new file with mode: 0644]
rostests/apitests/kernel32/testlist.c

index a8fa0da..1ea96f6 100644 (file)
@@ -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 (file)
index 0000000..96fc8bd
--- /dev/null
@@ -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 <windows.h>
+#include <stdio.h>
+#include <wine/test.h>
+
+
+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);
+}
index f29e08f..a0b5d03 100644 (file)
@@ -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},