From: <ric...@us...> - 2009-11-02 22:38:51
|
Revision: 1049 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1049&view=rev Author: rich_sposato Date: 2009-11-02 22:38:37 +0000 (Mon, 02 Nov 2009) Log Message: ----------- Changed parameter type for main. Modified Paths: -------------- trunk/test/LevelMutex/main.cpp Modified: trunk/test/LevelMutex/main.cpp =================================================================== --- trunk/test/LevelMutex/main.cpp 2009-11-02 05:48:02 UTC (rev 1048) +++ trunk/test/LevelMutex/main.cpp 2009-11-02 22:38:37 UTC (rev 1049) @@ -4,9 +4,9 @@ // Copyright (c) 2008 Richard Sposato // The copyright on this file is protected under the terms of the MIT license. // -// Permission to use, copy, modify, distribute and sell this software for any -// purpose is hereby granted without fee, provided that the above copyright -// notice appear in all copies and that both that copyright notice and this +// Permission to use, copy, modify, distribute and sell this software for any +// purpose is hereby granted without fee, provided that the above copyright +// notice appear in all copies and that both that copyright notice and this // permission notice appear in supporting documentation. // // The author makes no representations about the suitability of this software @@ -640,7 +640,7 @@ // ---------------------------------------------------------------------------- -int main( unsigned int argc, const char * const argv[] ) +int main( int argc, const char * const argv[] ) { cout << "Starting LevelMutex tests." << endl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2011-10-17 20:27:50
|
Revision: 1158 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1158&view=rev Author: rich_sposato Date: 2011-10-17 20:27:44 +0000 (Mon, 17 Oct 2011) Log Message: ----------- Replaced call to system with call to cin.get. Modified Paths: -------------- trunk/test/LevelMutex/main.cpp Modified: trunk/test/LevelMutex/main.cpp =================================================================== --- trunk/test/LevelMutex/main.cpp 2011-10-17 20:25:16 UTC (rev 1157) +++ trunk/test/LevelMutex/main.cpp 2011-10-17 20:27:44 UTC (rev 1158) @@ -20,7 +20,7 @@ // ---------------------------------------------------------------------------- -#include "LevelMutex.h" +#include "loki/LevelMutex.h" #include "MultiThreadTests.hpp" #include "Thing.hpp" @@ -642,6 +642,7 @@ int main( int argc, const char * const argv[] ) { + char ender; cout << "Starting LevelMutex tests." << endl; if ( 1 < argc ) @@ -674,7 +675,9 @@ cout << "Caught unknown exception!" << endl; } - ::system( "pause" ); + cout << "Press <Enter> key to continue. "; + cin.get( ender ); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2011-10-22 00:26:27
|
Revision: 1166 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1166&view=rev Author: rich_sposato Date: 2011-10-22 00:26:21 +0000 (Sat, 22 Oct 2011) Log Message: ----------- Added cout lines to say when test start and finish. Modified Paths: -------------- trunk/test/LevelMutex/main.cpp Modified: trunk/test/LevelMutex/main.cpp =================================================================== --- trunk/test/LevelMutex/main.cpp 2011-10-22 00:24:54 UTC (rev 1165) +++ trunk/test/LevelMutex/main.cpp 2011-10-22 00:26:21 UTC (rev 1166) @@ -47,6 +47,7 @@ void SingleThreadSimpleTest( void ) { + cout << "Starting SingleThreadSimpleTest." << endl; const unsigned int priorLevel = GetCurrentThreadsLevel(); const unsigned int priorLockCount = CountLocksInCurrentThread(); @@ -171,12 +172,15 @@ 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 @@ 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 @@ 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 @@ assert( okay ); okay = ( CountMutexesAtCurrentLevel() == priorLevelMutexCount ); assert( okay ); + + cout << "Finished SingleThreadExceptionTest." << endl; } // ---------------------------------------------------------------------------- @@ -675,7 +687,7 @@ 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 ); return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2011-11-07 23:31:42
|
Revision: 1173 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1173&view=rev Author: rich_sposato Date: 2011-11-07 23:31:36 +0000 (Mon, 07 Nov 2011) Log Message: ----------- Cosmetic changes. Modified Paths: -------------- trunk/test/LevelMutex/main.cpp Modified: trunk/test/LevelMutex/main.cpp =================================================================== --- trunk/test/LevelMutex/main.cpp 2011-11-04 00:54:46 UTC (rev 1172) +++ trunk/test/LevelMutex/main.cpp 2011-11-07 23:31:36 UTC (rev 1173) @@ -14,12 +14,7 @@ // //////////////////////////////////////////////////////////////////////////////// -// $Id$ - -// ---------------------------------------------------------------------------- - - #include "loki/LevelMutex.h" #include "MultiThreadTests.hpp" @@ -522,7 +517,6 @@ ExceptionMutex mutex2a( 2 ); mutex2a.GetMutexPolicy().SetTossPolicy( ExceptionTossingMutex::Never ); MutexErrors::Type result = MutexErrors::Success; - try { mutex1a.Lock(); @@ -557,6 +551,7 @@ ExceptionMutex mutex2d( 2 ); mutex2d.GetMutexPolicy().SetTossPolicy( ExceptionTossingMutex::Never ); LevelMutexInfo::MutexContainer mutexes; + try { mutexes.push_back( &mutex2a ); @@ -587,6 +582,7 @@ ExceptionMutex mutex3b( 3 ); mutex3b.GetMutexPolicy().SetTossPolicy( ExceptionTossingMutex::Never ); mutexes.clear(); + try { mutexes.push_back( &mutex3a ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |