mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:51:58 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
45
modules/rostests/apitests/gdi32/EngCreateSemaphore.c
Normal file
45
modules/rostests/apitests/gdi32/EngCreateSemaphore.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* PROJECT: ReactOS api tests
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* PURPOSE: Test for EngCreateSemaphore
|
||||
* PROGRAMMERS: Magnus Olsen
|
||||
*/
|
||||
|
||||
#include <apitest.h>
|
||||
|
||||
#include <wingdi.h>
|
||||
#include <winddi.h>
|
||||
|
||||
void Test_EngCreateSemaphore()
|
||||
{
|
||||
HSEMAPHORE hsem;
|
||||
PRTL_CRITICAL_SECTION lpcrit;
|
||||
|
||||
hsem = EngCreateSemaphore();
|
||||
ok(hsem != NULL, "EngCreateSemaphore failed\n");
|
||||
if (!hsem) return;
|
||||
lpcrit = (PRTL_CRITICAL_SECTION)hsem;
|
||||
|
||||
ok(lpcrit->LockCount == -1, "lpcrit->LockCount=%ld\n", lpcrit->LockCount);
|
||||
ok(lpcrit->RecursionCount == 0, "lpcrit->RecursionCount=%ld\n", lpcrit->RecursionCount);
|
||||
ok(lpcrit->OwningThread == 0, "lpcrit->OwningThread=%p\n", lpcrit->OwningThread);
|
||||
ok(lpcrit->LockSemaphore == 0, "lpcrit->LockSemaphore=%p\n", lpcrit->LockSemaphore);
|
||||
ok(lpcrit->SpinCount == 0, "lpcrit->SpinCount=%ld\n", lpcrit->SpinCount);
|
||||
|
||||
ok(lpcrit->DebugInfo != NULL, "no DebugInfo\n");
|
||||
if (lpcrit->DebugInfo)
|
||||
{
|
||||
ok(lpcrit->DebugInfo->Type == 0, "DebugInfo->Type=%d\n", lpcrit->DebugInfo->Type);
|
||||
ok(lpcrit->DebugInfo->CreatorBackTraceIndex == 0, "DebugInfo->CreatorBackTraceIndex=%d\n", lpcrit->DebugInfo->CreatorBackTraceIndex);
|
||||
ok(lpcrit->DebugInfo->EntryCount == 0, "DebugInfo->EntryCount=%ld\n", lpcrit->DebugInfo->EntryCount);
|
||||
ok(lpcrit->DebugInfo->ContentionCount == 0, "DebugInfo->ContentionCount=%ld\n", lpcrit->DebugInfo->ContentionCount);
|
||||
}
|
||||
|
||||
EngDeleteSemaphore(hsem);
|
||||
}
|
||||
|
||||
START_TEST(EngCreateSemaphore)
|
||||
{
|
||||
Test_EngCreateSemaphore();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue