From 457aee023d9c3ebcde0a60736fd17437b40d98c5 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 1 Jun 2008 15:48:51 +0000 Subject: [PATCH] add all test we can do for EngCreateSemaphore, it checking some info in the internal HANDLE hsem is same as PRTL_CRITICAL_SECTION struct svn path=/trunk/; revision=33811 --- .../gdi32api/tests/EngCreateSemaphore.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c b/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c index 0d02a0b63a5..272229c92f5 100644 --- a/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c +++ b/rostests/apitests/gdi32api/tests/EngCreateSemaphore.c @@ -18,8 +18,29 @@ Test_EngCreateSemaphore(PTESTINFO pti) 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; }