Author: greatlrd Date: Sun May 11 05:35:09 2008 New Revision: 33433
URL: http://svn.reactos.org/svn/reactos?rev=33433&view=rev Log: Adding simple test for CreateBitmapIndrect and show it care if bmWidthBytes is align or not this test have done on windows xp sp2 and pass it fine.
Added: trunk/rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c (with props) Modified: trunk/rostests/apitests/gdi32api/testlist.c
Modified: trunk/rostests/apitests/gdi32api/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/testlist... ============================================================================== --- trunk/rostests/apitests/gdi32api/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32api/testlist.c [iso-8859-1] Sun May 11 05:35:09 2008 @@ -6,6 +6,7 @@ /* include the tests */ #include "tests/AddFontResource.c" #include "tests/AddFontResourceEx.c" +#include "tests/CreateBitmapIndirect.c" #include "tests/CreateCompatibleDC.c" #include "tests/CreateFont.c" #include "tests/CreatePen.c" @@ -21,11 +22,14 @@ #include "tests/SetSysColors.c" #include "tests/SetWorldTransform.c"
+ + /* The List of tests */ TESTENTRY TestList[] = { { L"AddFontResourceA", Test_AddFontResourceA }, { L"AddFontResourceEx", Test_AddFontResourceEx }, + { L"CreateBitmapIndirect", Test_CreateBitmapIndirect }, { L"CreateCompatibleDC", Test_CreateCompatibleDC }, { L"CreateFont", Test_CreateFont }, { L"CreatePen", Test_CreatePen },
Added: trunk/rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/Cr... ============================================================================== --- trunk/rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c (added) +++ trunk/rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c [iso-8859-1] Sun May 11 05:35:09 2008 @@ -1,0 +1,58 @@ + + + +INT +Test_CreateBitmapIndirect(PTESTINFO pti) +{ + HBITMAP win_hBmp; + BITMAP win_bitmap; + + win_bitmap.bmBits = 0; + win_bitmap.bmBitsPixel = 1; + win_bitmap.bmHeight = 0; + win_bitmap.bmPlanes = 1; + win_bitmap.bmType = 1; + win_bitmap.bmWidth = 0; + win_bitmap.bmWidthBytes = 2; + win_hBmp = CreateBitmapIndirect(&win_bitmap); + RTEST(win_hBmp != 0); + + DeleteObject(win_hBmp); + + RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); + win_bitmap.bmBits = 0; + win_bitmap.bmBitsPixel = 1; + win_bitmap.bmHeight = 0; + win_bitmap.bmPlanes = 1; + win_bitmap.bmType = 1; + win_bitmap.bmWidth = 0; + win_bitmap.bmWidthBytes = 1; + win_hBmp = CreateBitmapIndirect(&win_bitmap); + RTEST(win_hBmp == 0); + + RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); + win_bitmap.bmBits = 0; + win_bitmap.bmBitsPixel = 1; + win_bitmap.bmHeight = 0; + win_bitmap.bmPlanes = 1; + win_bitmap.bmType = 1; + win_bitmap.bmWidth = 0; + win_bitmap.bmWidthBytes = 3; + win_hBmp = CreateBitmapIndirect(&win_bitmap); + RTEST(win_hBmp == 0); + + RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); + win_bitmap.bmBits = 0; + win_bitmap.bmBitsPixel = 1; + win_bitmap.bmHeight = 0; + win_bitmap.bmPlanes = 1; + win_bitmap.bmType = 1; + win_bitmap.bmWidth = 0; + win_bitmap.bmWidthBytes = 4; + win_hBmp = CreateBitmapIndirect(&win_bitmap); + RTEST(win_hBmp != 0); + + DeleteObject(win_hBmp); + + return APISTATUS_NORMAL; +}
Propchange: trunk/rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c ------------------------------------------------------------------------------ svn:eol-style = native