From: <ric...@us...> - 2011-10-03 05:05:47
|
Revision: 1134 http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1134&view=rev Author: rich_sposato Date: 2011-10-03 05:05:41 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Minor cosmetic changes. Also replaced system call with use of std::cin.get. Modified Paths: -------------- trunk/test/ThreadLocal/main.cpp Modified: trunk/test/ThreadLocal/main.cpp =================================================================== --- trunk/test/ThreadLocal/main.cpp 2011-10-03 05:03:10 UTC (rev 1133) +++ trunk/test/ThreadLocal/main.cpp 2011-10-03 05:05:41 UTC (rev 1134) @@ -28,10 +28,10 @@ #include <cstdlib> -#include <iostream> - -using namespace ::std; +#include <iostream> +using namespace ::std; + extern bool TestThreadLocalClassStaticValue( void ); extern bool TestThreadLocalFunctionStaticValue( void ); @@ -45,34 +45,36 @@ { (void)argc; (void)argv; - + bool okay = true; - cout << "Starting ThreadLocal tests." << endl; - cout << "If any tests fail, or any assertions fail," << endl + cout << "Starting ThreadLocal tests." << endl; + cout << "If any tests fail, or any assertions fail," << endl << "then your compiler does not implement thread_local storage correctly." << endl; - - cout << endl << "Testing static thread_local storage inside classes." << endl; - okay = TestThreadLocalClassStaticValue(); - if ( okay ) - cout << "Your compiler correctly implements thread_local storage for class static values." << endl; - else - cout << "Your compiler does not properly implement thread_local storage for class static values." << endl; - + + cout << endl << "Testing static thread_local storage inside classes." << endl; + okay = TestThreadLocalClassStaticValue(); + if ( okay ) + cout << "Your compiler correctly implements thread_local storage for class static values." << endl; + else + cout << "Your compiler does not properly implement thread_local storage for class static values." << endl; + cout << endl << "Testing static thread_local storage inside functions." << endl; okay = TestThreadLocalFunctionStaticValue(); if ( okay ) cout << "Your compiler correctly implements thread_local storage for function static values." << endl; else cout << "Your compiler does not properly implement thread_local storage for function static values." << endl; - - cout << endl << "Testing standalone static thread_local storage." << endl; - okay = TestThreadLocalStaticValue(); - if ( okay ) - cout << "Your compiler correctly implements thread_local storage for standalone static values." << endl; - else - cout << "Your compiler does not properly implement thread_local storage for standalone static values." << endl; - ::system( "pause" ); + cout << endl << "Testing standalone static thread_local storage." << endl; + okay = TestThreadLocalStaticValue(); + if ( okay ) + cout << "Your compiler correctly implements thread_local storage for standalone static values." << endl; + else + cout << "Your compiler does not properly implement thread_local storage for standalone static values." << endl; + + ::std::cout << "Please press enter key to continue." << ::std::endl; + ::std::cin.get(); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |