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
This commit is contained in:
rich_sposato 2011-10-22 00:26:21 +00:00
parent 20911ae3e7
commit ab47363c9b

View file

@ -47,6 +47,7 @@ typedef ::Loki::LevelMutex< ::Loki::SpinLevelMutex, 1,
void SingleThreadSimpleTest( void ) void SingleThreadSimpleTest( void )
{ {
cout << "Starting SingleThreadSimpleTest." << endl;
const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLevel = GetCurrentThreadsLevel();
const unsigned int priorLockCount = CountLocksInCurrentThread(); const unsigned int priorLockCount = CountLocksInCurrentThread();
@ -171,12 +172,15 @@ void SingleThreadSimpleTest( void )
assert( okay ); assert( okay );
okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount );
assert( okay ); assert( okay );
cout << "Finished SingleThreadSimpleTest." << endl;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void SingleThreadReentrantTest( void ) void SingleThreadReentrantTest( void )
{ {
cout << "Starting SingleThreadReentrantTest." << endl;
const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLevel = GetCurrentThreadsLevel();
const unsigned int priorLockCount = CountLocksInCurrentThread(); const unsigned int priorLockCount = CountLocksInCurrentThread();
@ -283,12 +287,15 @@ void SingleThreadReentrantTest( void )
assert( okay ); assert( okay );
okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount );
assert( okay ); assert( okay );
cout << "Finished SingleThreadReentrantTest." << endl;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void SingleThreadSimpleMultiLockTest( void ) void SingleThreadSimpleMultiLockTest( void )
{ {
cout << "Finished SingleThreadSimpleMultiLockTest." << endl;
const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLevel = GetCurrentThreadsLevel();
const unsigned int priorLockCount = CountLocksInCurrentThread(); const unsigned int priorLockCount = CountLocksInCurrentThread();
@ -481,12 +488,15 @@ void SingleThreadSimpleMultiLockTest( void )
assert( okay ); assert( okay );
okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount );
assert( okay ); assert( okay );
cout << "Finished SingleThreadSimpleMultiLockTest." << endl;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void SingleThreadExceptionTest( void ) void SingleThreadExceptionTest( void )
{ {
cout << "Starting SingleThreadExceptionTest." << endl;
const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLevel = GetCurrentThreadsLevel();
const unsigned int priorLockCount = CountLocksInCurrentThread(); const unsigned int priorLockCount = CountLocksInCurrentThread();
@ -636,6 +646,8 @@ void SingleThreadExceptionTest( void )
assert( okay ); assert( okay );
okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount );
assert( okay ); assert( okay );
cout << "Finished SingleThreadExceptionTest." << endl;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -675,7 +687,7 @@ int main( int argc, const char * const argv[] )
cout << "Caught unknown exception!" << endl; cout << "Caught unknown exception!" << endl;
} }
cout << "Press <Enter> key to continue. "; cout << endl << "Done running LevelMutex tests. Press <Enter> key to continue. " << endl;
cin.get( ender ); cin.get( ender );
return 0; return 0;