Author: greatlrd Date: Sun Jun 1 10:48:51 2008 New Revision: 33811
URL: http://svn.reactos.org/svn/reactos?rev=33811&view=rev Log: add all test we can do for EngCreateSemaphore, it checking some info in the internal HANDLE hsem is same as PRTL_CRITICAL_SECTION struct
Modified: trunk/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c
Modified: trunk/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/En... ============================================================================== --- trunk/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c [iso-8859-1] Sun Jun 1 10:48:51 2008 @@ -18,7 +18,28 @@ RTEST (lpcrit->LockSemaphore == 0); RTEST (lpcrit->SpinCount == 0);
+ ASSERT(lpcrit->DebugInfo != NULL); + RTEST (lpcrit->DebugInfo->Type == 0); + RTEST (lpcrit->DebugInfo->CreatorBackTraceIndex == 0); + RTEST (lpcrit->DebugInfo->EntryCount == 0); + RTEST (lpcrit->DebugInfo->ContentionCount == 0); + EngDeleteSemaphore(hsem); + + RTEST (lpcrit->DebugInfo != NULL); + RTEST (lpcrit->LockCount > 0); + RTEST (lpcrit->RecursionCount == 0); + RTEST (lpcrit->OwningThread == 0); + RTEST (lpcrit->LockSemaphore == 0); + RTEST (lpcrit->SpinCount == 0); + + ASSERT(lpcrit->DebugInfo != NULL); + // my (magnus olsen) value I getting back in vista RTEST (lpcrit->DebugInfo->Type == 0xA478); + RTEST (lpcrit->DebugInfo->Type != 0); + RTEST (lpcrit->DebugInfo->CreatorBackTraceIndex != 0); + RTEST (lpcrit->DebugInfo->EntryCount != 0); + // my (magnus olsen) value I getting back RTEST in vista (lpcrit->DebugInfo->ContentionCount == 0x20000); + RTEST (lpcrit->DebugInfo->ContentionCount != 0);
return APISTATUS_NORMAL; }