reactos/rostests/apitests/win32nt/ntgdi/NtGdiFlushUserBatch.c
Timo Kreuzer 7ad21a4425 [APOTESTS]
- Convert win32k native api test to actual wine style api-tests
- Hack around a bit with the win32k dlls, some renaming, etc.
- Delete old apitest stuff

svn path=/trunk/; revision=70458
2015-12-28 20:31:10 +00:00

50 lines
1 KiB
C

/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiFlushUserBatch
* PROGRAMMERS:
*/
#include <win32nt.h>
NTSTATUS
(NTAPI
*pNtGdiFlushUserBatch)(VOID);
START_TEST(NtGdiFlushUserBatch)
{
PVOID pRet;
PTEB pTeb;
pNtGdiFlushUserBatch = (PVOID)GetProcAddress(g_hModule, "NtGdiFlushUserBatch");
if (pNtGdiFlushUserBatch == NULL)
return APISTATUS_NOT_FOUND;
pTeb = NtCurrentTeb();
ASSERT(pTeb);
pRet = (PVOID)pNtGdiFlushUserBatch();
TEST(pRet != 0);
TEST(pRet == &pTeb->RealClientId);
TEST(pTeb->GdiBatchCount == 0);
TEST(pTeb->GdiTebBatch.Offset == 0);
TEST(pTeb->GdiTebBatch.HDC == 0);
/* Set up some bullshit */
pTeb->InDbgPrint = 1;
pTeb->GdiBatchCount = 12;
pTeb->GdiTebBatch.Offset = 21;
pTeb->GdiTebBatch.HDC = (HDC)123;
pRet = (PVOID)pNtGdiFlushUserBatch();
TEST(pRet == &pTeb->RealClientId);
TEST(pTeb->InDbgPrint == 0);
TEST(pTeb->GdiBatchCount == 12);
TEST(pTeb->GdiTebBatch.Offset == 0);
TEST(pTeb->GdiTebBatch.HDC == 0);
}