https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a23e8da23edebbcdc6839a...
commit a23e8da23edebbcdc6839a7172547b667f4493ed Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sat Apr 13 15:03:07 2024 +0300 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Wed Sep 18 10:22:26 2024 +0300
[WIN32NT_APITEST] Fix NtGdiCreateBitmap test on x64 --- modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c index fee272af496..2882b0ca332 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c @@ -54,10 +54,17 @@ void Test_NtGdiCreateBitmap_Params(void) ok_ptr(NtGdiCreateBitmap(1, -2, 1, 1, (BYTE*)(LONG_PTR)0x80001234), NULL); ok_long(GetLastError(), ERROR_SUCCESS);
+#ifndef _WIN64 // Win64 doesn't fail here /* Test huge size */ SetLastError(ERROR_SUCCESS); ok_ptr(NtGdiCreateBitmap(100000, 100000, 1, 1, NULL), NULL); ok_long(GetLastError(), ERROR_NOT_ENOUGH_MEMORY); +#endif + + /* Test too huge size */ + SetLastError(ERROR_SUCCESS); + ok_ptr(NtGdiCreateBitmap(100000, 100000, 1, 32, NULL), NULL); + ok_long(GetLastError(), ERROR_INVALID_PARAMETER);
/* Test huge size and valid bits */ SetLastError(ERROR_SUCCESS);