Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62966 - in trunk: boost/iostreams/filter libs/iostreams/test
From: steven_at_[hidden]
Date: 2010-06-15 00:16:16


Author: steven_watanabe
Date: 2010-06-15 00:16:11 EDT (Tue, 15 Jun 2010)
New Revision: 62966
URL: http://svn.boost.org/trac/boost/changeset/62966

Log:
Fix infinite loop in symmetric_filter_test
Text files modified:
   trunk/boost/iostreams/filter/symmetric.hpp | 2 +-
   trunk/libs/iostreams/test/symmetric_filter_test.cpp | 4 ++--
   2 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/iostreams/filter/symmetric.hpp
==============================================================================
--- trunk/boost/iostreams/filter/symmetric.hpp (original)
+++ trunk/boost/iostreams/filter/symmetric.hpp 2010-06-15 00:16:11 EDT (Tue, 15 Jun 2010)
@@ -89,7 +89,7 @@
               BOOST_PP_ENUM_BINARY_PARAMS(n, const T, &t) ) \
             : pimpl_(new impl(buffer_size BOOST_PP_COMMA_IF(n) \
                      BOOST_PP_ENUM_PARAMS(n, t))) \
- { } \
+ { assert(buffer_size > 0); } \
         /**/
     #define BOOST_PP_LOCAL_LIMITS (0, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
     #include BOOST_PP_LOCAL_ITERATE()

Modified: trunk/libs/iostreams/test/symmetric_filter_test.cpp
==============================================================================
--- trunk/libs/iostreams/test/symmetric_filter_test.cpp (original)
+++ trunk/libs/iostreams/test/symmetric_filter_test.cpp 2010-06-15 00:16:11 EDT (Tue, 15 Jun 2010)
@@ -111,7 +111,7 @@
         chain<input> ch;
         ch.push(
             io::symmetric_filter<closable_symmetric_filter>
- (0, seq.new_operation(2))
+ (1, seq.new_operation(2))
         );
         ch.push(closable_device<input>(seq.new_operation(1)));
         BOOST_CHECK_NO_THROW(ch.reset());
@@ -124,7 +124,7 @@
         chain<output> ch;
         ch.push(
             io::symmetric_filter<closable_symmetric_filter>
- (0, seq.new_operation(1))
+ (1, seq.new_operation(1))
         );
         ch.push(closable_device<output>(seq.new_operation(2)));
         BOOST_CHECK_NO_THROW(ch.reset());


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