Go to the source code of this file.
◆ START_TEST()
◆ Test_CreateBitmap()
void Test_CreateBitmap |
( |
| ) |
|
Definition at line 115 of file CreateBitmap.c.
119 ULONG cjWidthBytes, cBitsPixel, cExpectedBitsPixel;
122 ok(
hbmp != 0,
"should get a 1x1 bitmap\n");
136 ok(
hbmp == 0,
"should fail\n");
139 ok(
hbmp != 0,
"should get a 1x2 bitmap\n");
150 for (cBitsPixel = 0; cBitsPixel <= 32; cBitsPixel++)
154 if (cBitsPixel <= 1) cExpectedBitsPixel = 1;
155 else if (cBitsPixel <= 4) cExpectedBitsPixel = 4;
156 else if (cBitsPixel <= 8) cExpectedBitsPixel = 8;
157 else if (cBitsPixel <= 16) cExpectedBitsPixel = 16;
158 else if (cBitsPixel <= 24) cExpectedBitsPixel = 24;
159 else if (cBitsPixel <= 32) cExpectedBitsPixel = 32;
162 ok(
hbmp != 0,
"should get a 1x2 bitmap %ld\n", cBitsPixel);
166 cjWidthBytes = ((
bitmap.bmWidth *
bitmap.bmBitsPixel + 15) & ~15) >> 3;
179 ok(
hbmp == 0,
"Expected failure for 33 bpp\n");
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define ok_ptr(expression, result)
#define ok_int(expression, result)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
Referenced by START_TEST().
◆ Test_CreateBitmap_Params()
void Test_CreateBitmap_Params |
( |
| ) |
|
Definition at line 10 of file CreateBitmap.c.
30 ok(
hbmp == 0,
"CreateBitmap should fail\n");
35 ok(
hbmp == 0,
"CreateBitmap should fail\n");
40 ok(
hbmp == 0,
"CreateBitmap should fail\n");
45 ok(
hbmp == 0,
"CreateBitmap should fail\n");
51 ok(
hbmp == 0,
"CreateBitmap should fail\n");
56 ok(
hbmp != 0,
"CreateBitmap failed\n");
61 ok(
hbmp == 0,
"CreateBitmap should fail\n");
71 ok(
hbmp == 0,
"CreateBitmap should fail\n");
76 ok(
hbmp == 0,
"CreateBitmap should fail\n");
82 ok(
hbmp == 0,
"CreateBitmap should fail\n");
87 ok(
hbmp != 0,
"CreateBitmap failed\n");
90 ok(
hbmp != 0,
"CreateBitmap failed\n");
95 ok(
hbmp == 0,
"CreateBitmap should fail\n");
100 ok(
hbmp == 0,
"CreateBitmap should fail\n");
105 ok(
hbmp == 0,
"CreateBitmap should fail\n");
110 ok(
hbmp == 0,
"CreateBitmap should fail\n");
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define ERROR_INVALID_PARAMETER
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
Referenced by START_TEST().