https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6cad84a769ddc42ef4dc1807e5ffb161a87be0cd

commit 6cad84a769ddc42ef4dc1807e5ffb161a87be0cd
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Mon Jan 30 20:04:55 2023 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Tue Jan 31 18:39:21 2023 +0100

    [WIN32KNT_APITEST] Fox tests for NtGdiCreateDIBSection
---
 .../apitests/win32nt/ntgdi/NtGdiCreateDIBSection.c | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateDIBSection.c 
b/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateDIBSection.c
index b6f90e18000..07fcad20a45 100644
--- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateDIBSection.c
+++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateDIBSection.c
@@ -93,21 +93,21 @@ START_TEST(NtGdiCreateDIBSection)
 
 
     /* Test a 0 HDC */
-    SetLastError(0);
+    SetLastError(0xdeadbeef);
     pvBits = 0;
     hbmp = NtGdiCreateDIBSection(0, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits);
     TEST(pvBits != NULL);
     TEST(hbmp != 0);
-    TEST(GetLastError() == ERROR_NOT_ENOUGH_MEMORY);
+    ok_hex(GetLastError(), 0xdeadbeef);
     if (hbmp) DeleteObject(hbmp);
 
     /* Test a wrong HDC */
-    SetLastError(0);
+    SetLastError(0xdeadbeef);
     pvBits = 0;
     hbmp = NtGdiCreateDIBSection((HDC)(LONG_PTR)0xdeadbeef, NULL, 0, pbmi, 0, 
cjHeader, 0, 0, &pvBits);
     TEST(pvBits != 0);
     TEST(hbmp != 0);
-    TEST(GetLastError() == 8);
+    ok_hex(GetLastError(), 0xdeadbeef);
     if (hbmp) DeleteObject(hbmp);
 
     /* Test pbmi = NULL */
@@ -339,12 +339,12 @@ printf("dib with bitfileds: %p\n", hbmp);
     /* increased header size */
     pbih->biSize = sizeof(BITMAPINFOHEADER) + 4;
     cjHeader = pbih->biSize + cEntries * 4 + 8;
-    SetLastError(0);
+    SetLastError(0xdeadbeef);
     pvBits = 0;
     hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, 
&pvBits);
     TEST(pvBits != NULL);
     TEST(hbmp != 0);
-    TEST(GetLastError() == 8);
+    ok_hex(GetLastError(), 0xdeadbeef);
     if (hbmp) DeleteObject(hbmp);
 
     /* increased header size */
@@ -397,12 +397,12 @@ printf("dib with bitfileds: %p\n", hbmp);
     cjHeader = bmi.bmiHeader.biSize + cEntries * 4 + 8;
 
     /* Test something simple */
-    SetLastError(0);
+    SetLastError(0xdeadbeef);
     pvBits = 0;
     hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, 
&pvBits);
     TEST(pvBits != NULL);
     TEST(hbmp != 0);
-    TEST(GetLastError() == 8);
+    ok_hex(GetLastError(), 0xdeadbeef);
     if (hbmp) DeleteObject(hbmp);
 
 
@@ -437,23 +437,23 @@ printf("dib with bitfileds: %p\n", hbmp);
     cjHeader = pbV5h->bV5Size + cEntries * 4 + 8;
 
     /* Test something simple */
-    SetLastError(0);
+    SetLastError(0xdeadbeef);
     pvBits = 0;
     hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, 
&pvBits);
     TEST(pvBits != NULL);
     TEST(hbmp != 0);
-    TEST(GetLastError() == 8);
+    ok_hex(GetLastError(), 0xdeadbeef);
     if (hbmp) DeleteObject(hbmp);
 
     /* increased header size */
     pbV5h->bV5Size = sizeof(BITMAPV5HEADER) + 64;
     cjHeader = pbV5h->bV5Size + cEntries * 4 + 8;
-    SetLastError(0);
+    SetLastError(0xdeadbeef);
     pvBits = 0;
     hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, 
&pvBits);
     TEST(pvBits != NULL);
     TEST(hbmp != 0);
-    TEST(GetLastError() == 8);
+    ok_hex(GetLastError(), 0xdeadbeef);
     if (hbmp) DeleteObject(hbmp);
 
     /* Test section */

Reply via email to