Author: tfaber Date: Tue Aug 18 10:24:01 2015 New Revision: 68750
URL: http://svn.reactos.org/svn/reactos?rev=68750&view=rev Log: [GDI32_APITEST] - Add a simple test for SetBoundsRect
Added: trunk/rostests/apitests/gdi32/SetBoundsRect.c (with props) Modified: trunk/rostests/apitests/gdi32/CMakeLists.txt trunk/rostests/apitests/gdi32/testlist.c
Modified: trunk/rostests/apitests/gdi32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CMakeLists.... ============================================================================== --- trunk/rostests/apitests/gdi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/CMakeLists.txt [iso-8859-1] Tue Aug 18 10:24:01 2015 @@ -59,6 +59,7 @@ Rectangle.c RealizePalette.c SelectObject.c + SetBoundsRect.c SetBrushOrgEx.c SetDCPenColor.c SetDIBits.c
Added: trunk/rostests/apitests/gdi32/SetBoundsRect.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/SetBoundsRe... ============================================================================== --- trunk/rostests/apitests/gdi32/SetBoundsRect.c (added) +++ trunk/rostests/apitests/gdi32/SetBoundsRect.c [iso-8859-1] Tue Aug 18 10:24:01 2015 @@ -0,0 +1,56 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for SetBoundsRect + * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org + */ + +#include <apitest.h> +#include <winuser.h> +#include <wingdi.h> + +START_TEST(SetBoundsRect) +{ + HDC hDC; + UINT ret; + DWORD error; + + hDC = CreateCompatibleDC(GetDC(NULL)); + if (hDC == NULL) + { + skip("No DC\n"); + return; + } + + SetLastError(0xbeeffeed); + ret = SetBoundsRect(hDC, NULL, 0); + error = GetLastError(); + ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret); + ok(error == 0xbeeffeed, "error = %lu\n", error); + + SetLastError(0xbeeffeed); + ret = SetBoundsRect(hDC, NULL, DCB_ACCUMULATE); + error = GetLastError(); + ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret); + ok(error == 0xbeeffeed, "error = %lu\n", error); + + SetLastError(0xbeeffeed); + ret = SetBoundsRect(hDC, NULL, DCB_DISABLE); + error = GetLastError(); + ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret); + ok(error == 0xbeeffeed, "error = %lu\n", error); + + SetLastError(0xbeeffeed); + ret = SetBoundsRect(hDC, NULL, DCB_ENABLE); + error = GetLastError(); + ok(ret == (DCB_DISABLE | DCB_RESET), "ret = %u\n", ret); + ok(error == 0xbeeffeed, "error = %lu\n", error); + + SetLastError(0xbeeffeed); + ret = SetBoundsRect(hDC, NULL, DCB_RESET); + error = GetLastError(); + ok(ret == (DCB_ENABLE | DCB_RESET), "ret = %u\n", ret); + ok(error == 0xbeeffeed, "error = %lu\n", error); + + DeleteDC(hDC); +}
Propchange: trunk/rostests/apitests/gdi32/SetBoundsRect.c ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/rostests/apitests/gdi32/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/testlist.c?... ============================================================================== --- trunk/rostests/apitests/gdi32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/testlist.c [iso-8859-1] Tue Aug 18 10:24:01 2015 @@ -60,6 +60,7 @@ extern void func_Rectangle(void); extern void func_RealizePalette(void); extern void func_SelectObject(void); +extern void func_SetBoundsRect(void); extern void func_SetBrushOrgEx(void); extern void func_SetDCPenColor(void); extern void func_SetDIBits(void); @@ -129,6 +130,7 @@ { "Rectangle", func_Rectangle }, { "RealizePalette", func_RealizePalette }, { "SelectObject", func_SelectObject }, + { "SetBoundsRect", func_SetBoundsRect }, { "SetBrushOrgEx", func_SetBrushOrgEx }, { "SetDCPenColor", func_SetDCPenColor }, { "SetDIBits", func_SetDIBits },