[ros-diffs] [jgardou] 50947: [[GDI32_APITEST] - actually make a test, with == instead of =, relevant bits sets, good test value, etc.

jgardou at svn.reactos.org jgardou at svn.reactos.org
Tue Mar 1 21:32:58 UTC 2011


Author: jgardou
Date: Tue Mar  1 21:32:58 2011
New Revision: 50947

URL: http://svn.reactos.org/svn/reactos?rev=50947&view=rev
Log:
[[GDI32_APITEST]
  - actually make a test, with == instead of =, relevant bits sets, good test value, etc.

Modified:
    trunk/rostests/apitests/gdi32/SetDIBits.c

Modified: trunk/rostests/apitests/gdi32/SetDIBits.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/SetDIBits.c?rev=50947&r1=50946&r2=50947&view=diff
==============================================================================
--- trunk/rostests/apitests/gdi32/SetDIBits.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/SetDIBits.c [iso-8859-1] Tue Mar  1 21:32:58 2011
@@ -15,7 +15,7 @@
     char buffer[sizeof(BITMAPINFOHEADER)+2*sizeof(RGBQUAD)];
     ULONG* dibBuffer;
     BITMAPINFO* pBMI = (BITMAPINFO*)buffer;
-    DWORD bits1bpp[2] = {0, 1};
+    char bits1bpp[] = {0x80, 0, 0, 0};
     HBITMAP hbmp;
     int ret;
 
@@ -38,14 +38,14 @@
 
     pBMI->bmiHeader.biBitCount = 1;
     pBMI->bmiColors[0].rgbBlue = 0xFF;
-    pBMI->bmiColors[0].rgbGreen = 0xFF;
+    pBMI->bmiColors[0].rgbGreen = 0;
     pBMI->bmiColors[0].rgbRed = 0xFF;
 
     ret = SetDIBits(NULL, hbmp, 0, 1, bits1bpp, pBMI, DIB_RGB_COLORS);
     ok(ret == 1, "Copied %i scanlines\n", ret);
 
-    ok(dibBuffer[0] = 0xFFFFFF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[0]);
-    ok(dibBuffer[1] = 0xFFFFFF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[1]);
+    ok(dibBuffer[0] == 0, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[0]);
+    ok(dibBuffer[1] == 0xFF00FF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[1]);
 
     DeleteObject(hbmp);
 }




More information about the Ros-diffs mailing list