Author: jgardou
Date: Thu Nov 8 14:46:47 2012
New Revision: 57693
URL:
http://svn.reactos.org/svn/reactos?rev=57693&view=rev
Log:
[GDI32_APITEST]
- Add test showing that a bitmap created using CreateDIBItmap can be selected into a DC
despite a different bits depth
Modified:
trunk/rostests/apitests/gdi32/CreateDIBitmap.c
Modified: trunk/rostests/apitests/gdi32/CreateDIBitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CreateDIBi…
==============================================================================
--- trunk/rostests/apitests/gdi32/CreateDIBitmap.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/CreateDIBitmap.c [iso-8859-1] Thu Nov 8 14:46:47 2012
@@ -415,7 +415,7 @@
void
Test_CreateDIBitmap_CBM_CREATDIB(void)
{
- HBITMAP hbmp;
+ HBITMAP hbmp, hbmpOld;
HDC hdc;
BITMAPINFO bmi =
{{sizeof(BITMAPINFOHEADER), 4, 4, 1, 8, BI_RGB, 0, 1, 1, 1, 0}, {{0,0,0,0}}};
@@ -437,6 +437,11 @@
ok_int(bitmap.bmBitsPixel, 8);
ok_ptr(bitmap.bmBits, 0);
+ hbmpOld = SelectObject(hdc, hbmp);
+ ok(hbmpOld != NULL, "Couldn't select the bitmap.\n");
+ SelectObject(hdc, hbmpOld);
+ DeleteObject(hbmp);
+ DeleteDC(hdc);
}
START_TEST(CreateDIBitmap)