From ab47363c9b610326a4ad1bdeaaf0b324af2303f7 Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Sat, 22 Oct 2011 00:26:21 +0000 Subject: [PATCH] Added cout lines to say when test start and finish. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1166 7ec92016-0320-0410-acc4-a06ded1c099a --- test/LevelMutex/main.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/LevelMutex/main.cpp b/test/LevelMutex/main.cpp index f2ae062..73eee52 100644 --- a/test/LevelMutex/main.cpp +++ b/test/LevelMutex/main.cpp @@ -47,6 +47,7 @@ typedef ::Loki::LevelMutex< ::Loki::SpinLevelMutex, 1, void SingleThreadSimpleTest( void ) { + cout << "Starting SingleThreadSimpleTest." << endl; const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLockCount = CountLocksInCurrentThread(); @@ -171,12 +172,15 @@ void SingleThreadSimpleTest( void ) assert( okay ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); assert( okay ); + + cout << "Finished SingleThreadSimpleTest." << endl; } // ---------------------------------------------------------------------------- void SingleThreadReentrantTest( void ) { + cout << "Starting SingleThreadReentrantTest." << endl; const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLockCount = CountLocksInCurrentThread(); @@ -283,12 +287,15 @@ void SingleThreadReentrantTest( void ) assert( okay ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); assert( okay ); + + cout << "Finished SingleThreadReentrantTest." << endl; } // ---------------------------------------------------------------------------- void SingleThreadSimpleMultiLockTest( void ) { + cout << "Finished SingleThreadSimpleMultiLockTest." << endl; const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLockCount = CountLocksInCurrentThread(); @@ -481,12 +488,15 @@ void SingleThreadSimpleMultiLockTest( void ) assert( okay ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); assert( okay ); + + cout << "Finished SingleThreadSimpleMultiLockTest." << endl; } // ---------------------------------------------------------------------------- void SingleThreadExceptionTest( void ) { + cout << "Starting SingleThreadExceptionTest." << endl; const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLockCount = CountLocksInCurrentThread(); @@ -636,6 +646,8 @@ void SingleThreadExceptionTest( void ) assert( okay ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); assert( okay ); + + cout << "Finished SingleThreadExceptionTest." << endl; } // ---------------------------------------------------------------------------- @@ -675,7 +687,7 @@ int main( int argc, const char * const argv[] ) cout << "Caught unknown exception!" << endl; } - cout << "Press key to continue. "; + cout << endl << "Done running LevelMutex tests. Press key to continue. " << endl; cin.get( ender ); return 0;