mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:32:58 +00:00
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. svn path=/trunk/; revision=33433
This commit is contained in:
parent
ebdf34b599
commit
4b2acdc21b
2 changed files with 62 additions and 0 deletions
|
@ -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 },
|
||||
|
|
58
rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c
Normal file
58
rostests/apitests/gdi32api/tests/CreateBitmapIndirect.c
Normal file
|
@ -0,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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue