mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:13:01 +00:00
[Win32nt|ApiTests] Add Exclude, Intersect and Offset Clip Region tests.
This commit is contained in:
parent
4927905eeb
commit
ef8c9239d7
6 changed files with 98 additions and 1 deletions
|
@ -18,6 +18,7 @@ list(APPEND SOURCE
|
||||||
ntgdi/NtGdiDoPalette.c
|
ntgdi/NtGdiDoPalette.c
|
||||||
ntgdi/NtGdiEngCreatePalette.c
|
ntgdi/NtGdiEngCreatePalette.c
|
||||||
ntgdi/NtGdiEnumFontOpen.c
|
ntgdi/NtGdiEnumFontOpen.c
|
||||||
|
ntgdi/NtGdiExcludeClipRect.c
|
||||||
ntgdi/NtGdiExtSelectClipRgn.c
|
ntgdi/NtGdiExtSelectClipRgn.c
|
||||||
ntgdi/NtGdiExtTextOutW.c
|
ntgdi/NtGdiExtTextOutW.c
|
||||||
#ntgdi/NtGdiFlushUserBatch.c
|
#ntgdi/NtGdiFlushUserBatch.c
|
||||||
|
@ -26,6 +27,8 @@ list(APPEND SOURCE
|
||||||
ntgdi/NtGdiGetFontResourceInfoInternalW.c
|
ntgdi/NtGdiGetFontResourceInfoInternalW.c
|
||||||
ntgdi/NtGdiGetRandomRgn.c
|
ntgdi/NtGdiGetRandomRgn.c
|
||||||
ntgdi/NtGdiGetStockObject.c
|
ntgdi/NtGdiGetStockObject.c
|
||||||
|
ntgdi/NtGdiIntersectClipRect.c
|
||||||
|
ntgdi/NtGdiOffsetClipRgn.c
|
||||||
ntgdi/NtGdiPolyPolyDraw.c
|
ntgdi/NtGdiPolyPolyDraw.c
|
||||||
ntgdi/NtGdiRestoreDC.c
|
ntgdi/NtGdiRestoreDC.c
|
||||||
ntgdi/NtGdiSaveDC.c
|
ntgdi/NtGdiSaveDC.c
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS api tests
|
||||||
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
|
* PURPOSE: Test for NtGdiExcludeClipRect
|
||||||
|
* PROGRAMMERS:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <win32nt.h>
|
||||||
|
|
||||||
|
START_TEST(NtGdiExcludeClipRect)
|
||||||
|
{
|
||||||
|
//HDC hdc;
|
||||||
|
// test what params are accepted for what operations
|
||||||
|
// 0? invalid? are params maybe ignored in some cases?
|
||||||
|
// LastError
|
||||||
|
|
||||||
|
/* Preparation */
|
||||||
|
//hdc = CreateCompatibleDC(NULL);
|
||||||
|
|
||||||
|
/* Test NULL DC */
|
||||||
|
SetLastError(0x12345);
|
||||||
|
ok_int(NtGdiExcludeClipRect(NULL, 0, 0, 0, 0), ERROR);
|
||||||
|
ok_int(GetLastError(), ERROR_INVALID_HANDLE);
|
||||||
|
|
||||||
|
/* Test invalid DC */
|
||||||
|
SetLastError(0x12345);
|
||||||
|
ok_int(NtGdiExcludeClipRect((HDC)(ULONG_PTR)0x12345, 0, 0, 0, 0), ERROR);
|
||||||
|
ok((GetLastError() == ERROR_INVALID_HANDLE), "ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS api tests
|
* PROJECT: ReactOS api tests
|
||||||
* LICENSE: GPL - See COPYING in the top level directory
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
* PURPOSE: Test for NtGdiCombineRgn
|
* PURPOSE: Test for NtGdiExtSelectClipRgn
|
||||||
* PROGRAMMERS:
|
* PROGRAMMERS:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS api tests
|
||||||
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
|
* PURPOSE: Test for NtGdiIntersectClipRect
|
||||||
|
* PROGRAMMERS:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <win32nt.h>
|
||||||
|
|
||||||
|
START_TEST(NtGdiIntersectClipRect)
|
||||||
|
{
|
||||||
|
//HDC hdc;
|
||||||
|
// test what params are accepted for what operations
|
||||||
|
// 0? invalid? are params maybe ignored in some cases?
|
||||||
|
// LastError
|
||||||
|
|
||||||
|
/* Preparation */
|
||||||
|
//hdc = CreateCompatibleDC(NULL);
|
||||||
|
|
||||||
|
/* Test NULL DC */
|
||||||
|
SetLastError(0x12345);
|
||||||
|
ok_int(NtGdiIntersectClipRect(NULL, 0, 0, 0, 0), ERROR);
|
||||||
|
ok_int(GetLastError(), ERROR_INVALID_HANDLE);
|
||||||
|
|
||||||
|
/* Test invalid DC */
|
||||||
|
SetLastError(0x12345);
|
||||||
|
ok_int(NtGdiIntersectClipRect((HDC)(ULONG_PTR)0x12345, 0, 0, 0, 0), ERROR);
|
||||||
|
ok((GetLastError() == ERROR_INVALID_HANDLE), "ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
|
||||||
|
}
|
29
modules/rostests/apitests/win32nt/ntgdi/NtGdiOffsetClipRgn.c
Normal file
29
modules/rostests/apitests/win32nt/ntgdi/NtGdiOffsetClipRgn.c
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS api tests
|
||||||
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
|
* PURPOSE: Test for NtGdiOffsetClipRgn
|
||||||
|
* PROGRAMMERS:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <win32nt.h>
|
||||||
|
|
||||||
|
START_TEST(NtGdiOffsetClipRgn)
|
||||||
|
{
|
||||||
|
//HDC hdc;
|
||||||
|
// test what params are accepted for what operations
|
||||||
|
// 0? invalid? are params maybe ignored in some cases?
|
||||||
|
// LastError
|
||||||
|
|
||||||
|
/* Preparation */
|
||||||
|
//hdc = CreateCompatibleDC(NULL);
|
||||||
|
|
||||||
|
/* Test NULL DC */
|
||||||
|
SetLastError(0x12345);
|
||||||
|
ok_int(NtGdiOffsetClipRgn(NULL, 0, 0), ERROR);
|
||||||
|
ok_int(GetLastError(), ERROR_INVALID_HANDLE);
|
||||||
|
|
||||||
|
/* Test invalid DC */
|
||||||
|
SetLastError(0x12345);
|
||||||
|
ok_int(NtGdiOffsetClipRgn((HDC)(ULONG_PTR)0x12345, 0, 0), ERROR);
|
||||||
|
ok((GetLastError() == ERROR_INVALID_HANDLE), "ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
|
||||||
|
}
|
|
@ -19,6 +19,7 @@ extern void func_NtGdiDeleteObjectApp(void);
|
||||||
extern void func_NtGdiDoPalette(void);
|
extern void func_NtGdiDoPalette(void);
|
||||||
extern void func_NtGdiEngCreatePalette(void);
|
extern void func_NtGdiEngCreatePalette(void);
|
||||||
extern void func_NtGdiEnumFontOpen(void);
|
extern void func_NtGdiEnumFontOpen(void);
|
||||||
|
extern void func_NtGdiExcludeClipRect(void);
|
||||||
extern void func_NtGdiExtSelectClipRgn(void);
|
extern void func_NtGdiExtSelectClipRgn(void);
|
||||||
extern void func_NtGdiExtTextOutW(void);
|
extern void func_NtGdiExtTextOutW(void);
|
||||||
//extern void func_NtGdiFlushUserBatch(void);
|
//extern void func_NtGdiFlushUserBatch(void);
|
||||||
|
@ -27,6 +28,8 @@ extern void func_NtGdiGetDIBitsInternal(void);
|
||||||
extern void func_NtGdiGetFontResourceInfoInternalW(void);
|
extern void func_NtGdiGetFontResourceInfoInternalW(void);
|
||||||
extern void func_NtGdiGetRandomRgn(void);
|
extern void func_NtGdiGetRandomRgn(void);
|
||||||
extern void func_NtGdiGetStockObject(void);
|
extern void func_NtGdiGetStockObject(void);
|
||||||
|
extern void func_NtGdiIntersectClipRect(void);
|
||||||
|
extern void func_NtGdiOffsetClipRgn(void);
|
||||||
extern void func_NtGdiPolyPolyDraw(void);
|
extern void func_NtGdiPolyPolyDraw(void);
|
||||||
extern void func_NtGdiRestoreDC(void);
|
extern void func_NtGdiRestoreDC(void);
|
||||||
extern void func_NtGdiSaveDC(void);
|
extern void func_NtGdiSaveDC(void);
|
||||||
|
@ -80,6 +83,7 @@ const struct test winetest_testlist[] =
|
||||||
{ "NtGdiDoPalette", func_NtGdiDoPalette },
|
{ "NtGdiDoPalette", func_NtGdiDoPalette },
|
||||||
{ "NtGdiEngCreatePalette", func_NtGdiEngCreatePalette },
|
{ "NtGdiEngCreatePalette", func_NtGdiEngCreatePalette },
|
||||||
{ "NtGdiEnumFontOpen", func_NtGdiEnumFontOpen },
|
{ "NtGdiEnumFontOpen", func_NtGdiEnumFontOpen },
|
||||||
|
{ "NtGdiExcludeClipRect", func_NtGdiExcludeClipRect },
|
||||||
{ "NtGdiExtSelectClipRgn", func_NtGdiExtSelectClipRgn },
|
{ "NtGdiExtSelectClipRgn", func_NtGdiExtSelectClipRgn },
|
||||||
{ "NtGdiExtTextOutW", func_NtGdiExtTextOutW },
|
{ "NtGdiExtTextOutW", func_NtGdiExtTextOutW },
|
||||||
//{ "NtGdiFlushUserBatch", func_NtGdiFlushUserBatch },
|
//{ "NtGdiFlushUserBatch", func_NtGdiFlushUserBatch },
|
||||||
|
@ -88,6 +92,8 @@ const struct test winetest_testlist[] =
|
||||||
{ "NtGdiGetFontResourceInfoInternalW", func_NtGdiGetFontResourceInfoInternalW },
|
{ "NtGdiGetFontResourceInfoInternalW", func_NtGdiGetFontResourceInfoInternalW },
|
||||||
{ "NtGdiGetRandomRgn", func_NtGdiGetRandomRgn },
|
{ "NtGdiGetRandomRgn", func_NtGdiGetRandomRgn },
|
||||||
{ "NtGdiGetStockObject", func_NtGdiGetStockObject },
|
{ "NtGdiGetStockObject", func_NtGdiGetStockObject },
|
||||||
|
{ "NtGdiIntersectClipRect", func_NtGdiIntersectClipRect },
|
||||||
|
{ "NtGdiOffsetClipRgn", func_NtGdiOffsetClipRgn },
|
||||||
{ "NtGdiPolyPolyDraw", func_NtGdiPolyPolyDraw },
|
{ "NtGdiPolyPolyDraw", func_NtGdiPolyPolyDraw },
|
||||||
{ "NtGdiRestoreDC", func_NtGdiRestoreDC },
|
{ "NtGdiRestoreDC", func_NtGdiRestoreDC },
|
||||||
{ "NtGdiSaveDC", func_NtGdiSaveDC },
|
{ "NtGdiSaveDC", func_NtGdiSaveDC },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue