mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:05:52 +00:00
[[GDI32_APITEST]
- actually make a test, with == instead of =, relevant bits sets, good test value, etc. svn path=/trunk/; revision=50947
This commit is contained in:
parent
a5115608c9
commit
d5954abbf2
1 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ void Test_SetDIBits()
|
|||
char buffer[sizeof(BITMAPINFOHEADER)+2*sizeof(RGBQUAD)];
|
||||
ULONG* dibBuffer;
|
||||
BITMAPINFO* pBMI = (BITMAPINFO*)buffer;
|
||||
DWORD bits1bpp[2] = {0, 1};
|
||||
char bits1bpp[] = {0x80, 0, 0, 0};
|
||||
HBITMAP hbmp;
|
||||
int ret;
|
||||
|
||||
|
@ -38,14 +38,14 @@ void Test_SetDIBits()
|
|||
|
||||
pBMI->bmiHeader.biBitCount = 1;
|
||||
pBMI->bmiColors[0].rgbBlue = 0xFF;
|
||||
pBMI->bmiColors[0].rgbGreen = 0xFF;
|
||||
pBMI->bmiColors[0].rgbGreen = 0;
|
||||
pBMI->bmiColors[0].rgbRed = 0xFF;
|
||||
|
||||
ret = SetDIBits(NULL, hbmp, 0, 1, bits1bpp, pBMI, DIB_RGB_COLORS);
|
||||
ok(ret == 1, "Copied %i scanlines\n", ret);
|
||||
|
||||
ok(dibBuffer[0] = 0xFFFFFF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[0]);
|
||||
ok(dibBuffer[1] = 0xFFFFFF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[1]);
|
||||
ok(dibBuffer[0] == 0, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[0]);
|
||||
ok(dibBuffer[1] == 0xFF00FF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[1]);
|
||||
|
||||
DeleteObject(hbmp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue