Author: jgardou
Date: Tue Oct 30 02:05:52 2012
New Revision: 57650
URL:
http://svn.reactos.org/svn/reactos?rev=57650&view=rev
Log:
[W32K_APITEST]
- Better test for NtUserGetIconInfo
Modified:
trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c
Modified: trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntuser/…
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c [iso-8859-1] Tue Oct 30
02:05:52 2012
@@ -109,7 +109,9 @@
TEST(hIcon != NULL);
- RtlInitUnicodeString(&hInstStr, NULL);
+ hInstStr.Buffer = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
+ hInstStr.MaximumLength = MAX_PATH;
+ hInstStr.Length = 0;
RtlInitUnicodeString(&ResourceStr, NULL);
TEST(NtUserGetIconInfo(hIcon,
@@ -119,15 +121,16 @@
&bpp,
FALSE) == TRUE);
- TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer);
- TEST(hInstStr.Length == 0);
- TEST(hInstStr.MaximumLength == 0);
+ TEST(hInstStr.Length != 0);
+ hInstStr.Buffer[hInstStr.Length] = 0;
+ printf("%s,%i: hInstStr.buffer : %S\n", __FUNCTION__, __LINE__,
hInstStr.Buffer);
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(293));
TEST(ResourceStr.Length == 0);
TEST(ResourceStr.MaximumLength == 0);
TEST(bpp == 32);
- RtlInitUnicodeString(&hInstStr, NULL);
+ ZeroMemory(hInstStr.Buffer, MAX_PATH*sizeof(WCHAR));
+ hInstStr.Length = 0;
RtlInitUnicodeString(&ResourceStr, NULL);
TEST(NtUserGetIconInfo(hIcon,
@@ -137,9 +140,9 @@
&bpp,
TRUE) == TRUE);
- TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer);
- TEST(hInstStr.Length == 0);
- TEST(hInstStr.MaximumLength == 0);
+ TEST(hInstStr.Length != 0);
+ hInstStr.Buffer[hInstStr.Length] = 0;
+ printf("%s,%i: hInstStr.buffer : %S\n", __FUNCTION__, __LINE__,
hInstStr.Buffer);
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(293));
TEST(bpp == 32);