Fix copy paste error in file header
[reactos.git] / rostests / apitests / gdi32api / tests / EngCreateSemaphore.c
1 /* Simple test of EngAcquireSemaphore only check if we got a lock or not */
2 INT
3 Test_EngCreateSemaphore(PTESTINFO pti)
4 {
5
6 HSEMAPHORE hsem;
7 PRTL_CRITICAL_SECTION lpcrit;
8
9 hsem = EngCreateSemaphore();
10 RTEST ( hsem != NULL );
11 ASSERT(hsem != NULL);
12
13 lpcrit = (PRTL_CRITICAL_SECTION) hsem;
14 RTEST ( lpcrit->DebugInfo != NULL);
15 RTEST (lpcrit->LockCount == -1);
16 RTEST (lpcrit->RecursionCount == 0);
17 RTEST (lpcrit->OwningThread == 0);
18 RTEST (lpcrit->LockSemaphore == 0);
19 RTEST (lpcrit->SpinCount == 0);
20
21 ASSERT(lpcrit->DebugInfo != NULL);
22 RTEST (lpcrit->DebugInfo->Type == 0);
23 RTEST (lpcrit->DebugInfo->CreatorBackTraceIndex == 0);
24 RTEST (lpcrit->DebugInfo->EntryCount == 0);
25 RTEST (lpcrit->DebugInfo->ContentionCount == 0);
26
27 EngDeleteSemaphore(hsem);
28
29 return APISTATUS_NORMAL;
30 }
31