Author: greatlrd
Date: Sat May 10 11:12:35 2008
New Revision: 33410
URL:
http://svn.reactos.org/svn/reactos?rev=33410&view=rev
Log:
adding a testcase for GetStockObject(21);
it is 1x1 1Bpp Bitmap.
Modified:
trunk/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c
Modified: trunk/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntgdi/N…
==============================================================================
--- trunk/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c [iso-8859-1] Sat May 10
11:12:35 2008
@@ -3,6 +3,7 @@
Test_NtGdiGetStockObject(PTESTINFO pti)
{
HANDLE handle = NULL;
+ BITMAP bitmap;
/* BRUSH testing */
handle = (HANDLE) NtGdiGetStockObject(WHITE_BRUSH);
@@ -114,11 +115,22 @@
RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_COLORSPACE);
RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE);
+ /* value 21 is getting back 1x1 1Bpp Bitmap */
handle = (HANDLE) NtGdiGetStockObject(21);
RTEST(handle != 0);
RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BITMAP);
RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE);
+ RTEST(GetObject(handle, sizeof(BITMAP), &bitmap) == sizeof(BITMAP));
+ RTEST(bitmap.bmType == 0);
+ RTEST(bitmap.bmWidth == 1);
+ RTEST(bitmap.bmHeight == 1);
+ RTEST(bitmap.bmWidthBytes == 2);
+ RTEST(bitmap.bmPlanes == 1);
+ RTEST(bitmap.bmBitsPixel == 1);
+ RTEST(bitmap.bmBits == 0);
+
+
RTEST(NtGdiGetStockObject(22) == 0);
RTEST(NtGdiGetStockObject(23) == 0);
return APISTATUS_NORMAL;