https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e80e2051562f734256f3f5...
commit e80e2051562f734256f3f58831fc81f5b8c0c37c Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Sun Jan 27 16:35:53 2019 +0900 Commit: GitHub noreply@github.com CommitDate: Sun Jan 27 16:35:53 2019 +0900
[WIN32KNT_APITEST] NtGdiSetBitmapBits: Add tests for maximum buffer size (#1311)
Improve NtGdiSetBitmapBits testcase by adding tests for maximum buffer size. CORE-15657 --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index dcea8a8f8e..4544c8de33 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -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);