Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83266 - in trunk/libs/thread: example test
From: vicente.botet_at_[hidden]
Date: 2013-03-03 06:02:32


Author: viboes
Date: 2013-03-03 06:02:31 EST (Sun, 03 Mar 2013)
New Revision: 83266
URL: http://svn.boost.org/trac/boost/changeset/83266

Log:
Thread: Added test for synchronized_value + synchronize free function
Text files modified:
   trunk/libs/thread/example/synchronized_person.cpp | 23 +++++++++++++++++++++++
   trunk/libs/thread/test/Jamfile.v2 | 23 ++++++++++++++++++++++-
   2 files changed, 45 insertions(+), 1 deletions(-)

Modified: trunk/libs/thread/example/synchronized_person.cpp
==============================================================================
--- trunk/libs/thread/example/synchronized_person.cpp (original)
+++ trunk/libs/thread/example/synchronized_person.cpp 2013-03-03 06:02:31 EST (Sun, 03 Mar 2013)
@@ -255,5 +255,28 @@
     lk2->SetName("Javier");
     lk3->SetName("Matias");
   }
+#if ! defined BOOST_NO_CXX11_AUTO_DECLARATIONS \
+&& ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS)
+ {
+ Person3_ts p1(1);
+ Person3_ts p2(2);
+ Person3_ts p3(3);
+
+ auto t = boost::synchronize(p1,p2,p3);
+ std::get<0>(t)->SetName("Carmen");
+ std::get<1>(t)->SetName("Javier");
+ std::get<2>(t)->SetName("Matias");
+ }
+ {
+ const Person3_ts p1(1);
+ Person3_ts p2(2);
+ const Person3_ts p3(3);
+
+ auto t = boost::synchronize(p1,p2,p3);
+ //std::get<0>(t)->SetName("Carmen");
+ std::get<1>(t)->SetName("Javier");
+ //std::get<2>(t)->SetName("Matias");
+ }
+#endif
   return 0;
 }

Modified: trunk/libs/thread/test/Jamfile.v2
==============================================================================
--- trunk/libs/thread/test/Jamfile.v2 (original)
+++ trunk/libs/thread/test/Jamfile.v2 2013-03-03 06:02:31 EST (Sun, 03 Mar 2013)
@@ -702,6 +702,26 @@
           [ thread-run2-noit ./sync/mutual_exclusion/locks/reverse_lock/types_pass.cpp : reverse_lock__types_p ]
     ;
 
+
+ explicit ts_synchronized_value ;
+ test-suite ts_synchronized_value
+ :
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/copy_assign_pass.cpp : synchronized_value__copy_assign_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/copy_ctor_pass.cpp : synchronized_value__copy_ctor_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/copy_T_assign_pass.cpp : synchronized_value__copy_T_assign_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/copy_T_ctor_pass.cpp : synchronized_value__copy_T_ctor_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/default_ctor_pass.cpp : synchronized_value__default_ctor_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/indirect_pass.cpp : synchronized_value__indirect_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/move_assign_pass.cpp : synchronized_value__move_assign_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/move_ctor_pass.cpp : synchronized_value__move_ctor_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/move_T_assign_pass.cpp : synchronized_value__move_T_assign_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/move_T_ctor_pass.cpp : synchronized_value__move_T_ctor_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/swap_pass.cpp : synchronized_value__swap_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/swap_T_pass.cpp : synchronized_value__swap_T_p ]
+ [ thread-run2-noit ./sync/mutual_exclusion/synchronized_value/synchronize_pass.cpp : synchronized_value__synchronize_p ]
+
+ ;
+
     explicit ts_ ;
     test-suite ts_
     :
@@ -710,13 +730,14 @@
           #[ thread-run ../example/test_so2.cpp ]
 
           #[ compile virtual_noexcept.cpp ]
- [ thread-run test_7720.cpp ]
+ #[ thread-run test_7720.cpp ]
           #[ thread-run test_7666.cpp ]
           #[ thread-run test_7666.cpp ]
           #[ thread-run ../example/unwrap.cpp ]
           #[ thread-run ../example/perf_condition_variable.cpp ]
           #[ thread-run ../example/perf_shared_mutex.cpp ]
           #[ thread-run ../example/not_interleaved.cpp ]
+
     ;
 
 }


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