mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 04:20:46 +00:00
[WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for max buffer size 2 (#1312)
Improve NtGdiSetBitmapBits testcase again and again. CORE-15657
This commit is contained in:
parent
e80e205156
commit
1ad9a1deab
1 changed files with 38 additions and 0 deletions
|
@ -94,6 +94,20 @@ START_TEST(NtGdiSetBitmapBits)
|
||||||
ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0);
|
ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0);
|
||||||
ok_long(GetLastError(), 0xDEADFACE);
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
|
{
|
||||||
|
BYTE dummy[256] = { 1 };
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0xC);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
|
ok_int(dummy[0], 1);
|
||||||
|
}
|
||||||
|
|
||||||
SetLastError(0xDEADFACE);
|
SetLastError(0xDEADFACE);
|
||||||
ok_long(NtGdiSetBitmapBits(hBitmap, 0x7FFF, Bits), 0);
|
ok_long(NtGdiSetBitmapBits(hBitmap, 0x7FFF, Bits), 0);
|
||||||
ok_long(GetLastError(), 0xDEADFACE);
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
@ -206,6 +220,14 @@ START_TEST(NtGdiSetBitmapBits)
|
||||||
ok_int(Bits[3], 0x33);
|
ok_int(Bits[3], 0x33);
|
||||||
ok_int(Bits[4], 0x55);
|
ok_int(Bits[4], 0x55);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x20);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
DeleteObject(hBitmap);
|
DeleteObject(hBitmap);
|
||||||
|
|
||||||
/* ------------------------- */
|
/* ------------------------- */
|
||||||
|
@ -304,6 +326,14 @@ START_TEST(NtGdiSetBitmapBits)
|
||||||
ok_int(Bits[3], 0x33);
|
ok_int(Bits[3], 0x33);
|
||||||
ok_int(Bits[4], 0x55);
|
ok_int(Bits[4], 0x55);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x234);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
DeleteObject(hBitmap);
|
DeleteObject(hBitmap);
|
||||||
DeleteDC(hDC);
|
DeleteDC(hDC);
|
||||||
|
|
||||||
|
@ -403,6 +433,14 @@ START_TEST(NtGdiSetBitmapBits)
|
||||||
ok_int(Bits[3], 0x33);
|
ok_int(Bits[3], 0x33);
|
||||||
ok_int(Bits[4], 0x55);
|
ok_int(Bits[4], 0x55);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 564, Bits), 0x234);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
|
SetLastError(0xDEADFACE);
|
||||||
|
ok_long(NtGdiSetBitmapBits(hBitmap, 565, Bits), 0);
|
||||||
|
ok_long(GetLastError(), 0xDEADFACE);
|
||||||
|
|
||||||
DeleteObject(hBitmap);
|
DeleteObject(hBitmap);
|
||||||
DeleteDC(hDC);
|
DeleteDC(hDC);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue