$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60285 - sandbox/stm/branches/vbe/libs/stm/example/tx
From: vicente.botet_at_[hidden]
Date: 2010-03-07 05:28:22
Author: viboes
Date: 2010-03-07 05:28:21 EST (Sun, 07 Mar 2010)
New Revision: 60285
URL: http://svn.boost.org/trac/boost/changeset/60285
Log:
Boost.STM/vbe: 
* Added input/output tests from numeric
Text files modified: 
   sandbox/stm/branches/vbe/libs/stm/example/tx/numeric.cpp |    19 +++++++++++++++++++                     
   1 files changed, 19 insertions(+), 0 deletions(-)
Modified: sandbox/stm/branches/vbe/libs/stm/example/tx/numeric.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/example/tx/numeric.cpp	(original)
+++ sandbox/stm/branches/vbe/libs/stm/example/tx/numeric.cpp	2010-03-07 05:28:21 EST (Sun, 07 Mar 2010)
@@ -360,6 +360,23 @@
 
     return true;
 }
+bool test_output() {
+    std::stringstream strstr;
+    BOOST_STM_E_TRANSACTION {
+        strstr << counter;
+    } BOOST_STM_E_END_TRANSACTION;
+
+    return (strstr.str()=="0");
+}
+bool test_input() {
+    std::stringstream strstr("2\n");
+    BOOST_STM_E_TRANSACTION {
+        strstr >> counter;
+        BOOST_STM_E_RETURN(2==counter) ;
+    } BOOST_STM_E_END_TRANSACTION;
+
+    return false;
+}
 
 int test_all() {
     int fails=0;
@@ -383,6 +400,8 @@
     fails += !test_nested_e();
     fails += !test_le();
     fails += !test_const(counter);
+    fails += !test_output();
+    fails += !test_input();
 
     fails += !test_par();