mirror of
https://github.com/reactos/reactos.git
synced 2024-11-10 00:34:39 +00:00
36 lines
701 B
C
36 lines
701 B
C
|
|
||
|
INT
|
||
|
Test_NtGdiFlushUserBatch(PTESTINFO pti)
|
||
|
{
|
||
|
PVOID pRet;
|
||
|
PTEB pTeb;
|
||
|
|
||
|
pTeb = NtCurrentTeb();
|
||
|
ASSERT(pTeb);
|
||
|
|
||
|
pRet = (PVOID)NtGdiFlushUserBatch();
|
||
|
|
||
|
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)NtGdiFlushUserBatch();
|
||
|
TEST(pRet == &pTeb->RealClientId);
|
||
|
|
||
|
TEST(pTeb->InDbgPrint == 0);
|
||
|
TEST(pTeb->GdiBatchCount == 12);
|
||
|
TEST(pTeb->GdiTebBatch.Offset == 0);
|
||
|
TEST(pTeb->GdiTebBatch.HDC == 0);
|
||
|
|
||
|
return APISTATUS_NORMAL;
|
||
|
}
|