[WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for maximum buffer size (#1311)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 27 Jan 2019 07:35:53 +0000 (16:35 +0900)
committerGitHub <noreply@github.com>
Sun, 27 Jan 2019 07:35:53 +0000 (16:35 +0900)
Improve NtGdiSetBitmapBits testcase by adding tests for maximum buffer size. CORE-15657

modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c

index dcea8a8..4544c8d 100644 (file)
@@ -82,6 +82,26 @@ START_TEST(NtGdiSetBitmapBits)
     ok_long(NtGdiSetBitmapBits(hBitmap, 12345678, Bits), 0);
     ok_long(GetLastError(), 0xDEADFACE);
 
+    SetLastError(0xDEADFACE);
+    ok_long(NtGdiSetBitmapBits(hBitmap, 0x100, Bits), 0xC);
+    ok_long(GetLastError(), 0xDEADFACE);
+
+    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);
+
+    SetLastError(0xDEADFACE);
+    ok_long(NtGdiSetBitmapBits(hBitmap, 0x7FFF, Bits), 0);
+    ok_long(GetLastError(), 0xDEADFACE);
+
+    SetLastError(0xDEADFACE);
+    ok_long(NtGdiSetBitmapBits(hBitmap, 0x8000, Bits), 0);
+    ok_long(GetLastError(), 0xDEADFACE);
+
     SetLastError(0xDEADFACE);
     ok_long(NtGdiSetBitmapBits(hBitmap, 0xFFFF, Bits), 0);
     ok_long(GetLastError(), 0xDEADFACE);