|
From: <ric...@us...> - 2011-10-17 20:00:08
|
Revision: 1153
http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1153&view=rev
Author: rich_sposato
Date: 2011-10-17 20:00:02 +0000 (Mon, 17 Oct 2011)
Log Message:
-----------
Replaced call to system with call to cin.get.
Modified Paths:
--------------
trunk/test/SmartPtr/LockTest.cpp
Modified: trunk/test/SmartPtr/LockTest.cpp
===================================================================
--- trunk/test/SmartPtr/LockTest.cpp 2011-10-17 19:57:36 UTC (rev 1152)
+++ trunk/test/SmartPtr/LockTest.cpp 2011-10-17 20:00:02 UTC (rev 1153)
@@ -1,12 +1,12 @@
////////////////////////////////////////////////////////////////////////////////
// Test program for The Loki Library
// Copyright (c) 2006 Richard Sposato
-// 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 authors make no representations about the
-// suitability of this software for any purpose. It is provided "as is"
+// The authors make no representations about the
+// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
////////////////////////////////////////////////////////////////////////////////
@@ -425,18 +425,23 @@
void DoLockedPtrTest( void )
{
- cout << "Doing thread-locked pointer tests." << endl;
+ char ender;
+
SafeA::GetIt();
UnsafeA::GetIt();
- ::system( "pause" );
+ cout << "Doing thread-locked pointer tests." << endl;
+ cout << "Press <Enter> key to start test. " << endl;
+ cin.get( ender );
{
ThreadPool pool;
pool.Create( 5, RunLocked );
pool.Start();
pool.Join();
}
+
cout << "Doing thread-unsafe pointer tests." << endl;
- ::system( "pause" );
+ cout << "Press <Enter> key to start test. " << endl;
+ cin.get( ender );
{
ThreadPool pool;
pool.Create( 5, Run );
@@ -451,22 +456,25 @@
void DoLockedStorageTest( void )
{
+ char ender;
+ SelfLockedA::GetIt();
cout << "Doing LockedStorage tests." << endl;
- SelfLockedA::GetIt();
- ::system( "pause" );
+ cout << "Press <Enter> key to start test. " << endl;
+ cin.get( ender );
{
ThreadPool pool;
pool.Create( 5, RunLockedStorage );
pool.Start();
pool.Join();
}
- ::system( "pause" );
+ cout << "Press <Enter> key when ready. " << endl;
+ cin.get( ender );
SelfLockedA::Destroy();
}
// ----------------------------------------------------------------------------
-#endif //#ifdef using multi-threaded model
+#endif //#ifdef using multi-threaded model
// ----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|