Marcus Meissner : kernel32/tests: Test -1 length for NULL ptr too.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Nov 24 06:19:20 CST 2006
Module: wine
Branch: master
Commit: 9e8b1259caaa89699de91186837733ee85fdba4f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e8b1259caaa89699de91186837733ee85fdba4f
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Thu Nov 23 21:24:33 2006 +0100
kernel32/tests: Test -1 length for NULL ptr too.
---
dlls/kernel32/tests/codepage.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c
index d65aa59..de15067 100644
--- a/dlls/kernel32/tests/codepage.c
+++ b/dlls/kernel32/tests/codepage.c
@@ -101,6 +101,13 @@ static void test_null_source(void)
ok(!len && GLE == ERROR_INVALID_PARAMETER,
"WideCharToMultiByte returned %d with GLE=%d (expected 0 with ERROR_INVALID_PARAMETER)\n",
len, GLE);
+
+ SetLastError(0);
+ len = WideCharToMultiByte(CP_ACP, 0, NULL, -1, NULL, 0, NULL, NULL);
+ GLE = GetLastError();
+ ok(!len && GLE == ERROR_INVALID_PARAMETER,
+ "WideCharToMultiByte returned %d with GLE=%d (expected 0 with ERROR_INVALID_PARAMETER)\n",
+ len, GLE);
}
/* lstrcmpW is not supported on Win9x! */
More information about the wine-cvs
mailing list