Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2007-12-21 05:55:00


Author: anthonyw
Date: 2007-12-21 05:54:59 EST (Fri, 21 Dec 2007)
New Revision: 42228
URL: http://svn.boost.org/trac/boost/changeset/42228

Log:
Updated thread ID test
Text files modified:
   trunk/libs/thread/test/test_thread_id.cpp | 30 ++++++++++++++++--------------
   1 files changed, 16 insertions(+), 14 deletions(-)

Modified: trunk/libs/thread/test/test_thread_id.cpp
==============================================================================
--- trunk/libs/thread/test/test_thread_id.cpp (original)
+++ trunk/libs/thread/test/test_thread_id.cpp 2007-12-21 05:54:59 EST (Fri, 21 Dec 2007)
@@ -98,21 +98,23 @@
         BOOST_CHECK(false);
     }
 
- BOOST_CHECK(boost::thread::id() < t.get_id());
- BOOST_CHECK(boost::thread::id() < t2.get_id());
- BOOST_CHECK(boost::thread::id() < t3.get_id());
-
- BOOST_CHECK(boost::thread::id() <= t.get_id());
- BOOST_CHECK(boost::thread::id() <= t2.get_id());
- BOOST_CHECK(boost::thread::id() <= t3.get_id());
-
- BOOST_CHECK(!(boost::thread::id() > t.get_id()));
- BOOST_CHECK(!(boost::thread::id() > t2.get_id()));
- BOOST_CHECK(!(boost::thread::id() > t2.get_id()));
+ boost::thread::id default_id;
+
+ BOOST_CHECK(default_id < t.get_id());
+ BOOST_CHECK(default_id < t2.get_id());
+ BOOST_CHECK(default_id < t3.get_id());
+
+ BOOST_CHECK(default_id <= t.get_id());
+ BOOST_CHECK(default_id <= t2.get_id());
+ BOOST_CHECK(default_id <= t3.get_id());
+
+ BOOST_CHECK(!(default_id > t.get_id()));
+ BOOST_CHECK(!(default_id > t2.get_id()));
+ BOOST_CHECK(!(default_id > t3.get_id()));
     
- BOOST_CHECK(!(boost::thread::id() >= t.get_id()));
- BOOST_CHECK(!(boost::thread::id() >= t2.get_id()));
- BOOST_CHECK(!(boost::thread::id() >= t2.get_id()));
+ BOOST_CHECK(!(default_id >= t.get_id()));
+ BOOST_CHECK(!(default_id >= t2.get_id()));
+ BOOST_CHECK(!(default_id >= t3.get_id()));
 
     t.join();
     t2.join();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk