Update of /cvsroot/boost/boost/libs/iostreams/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19574/libs/iostreams/test

Modified Files:
        offset_test.cpp putback_test.hpp restrict_test.cpp 
Log Message:
Added Kim Barrett's patches that merge the changes from 1.33.1 into cvs HEAD.

Index: offset_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/iostreams/test/offset_test.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- offset_test.cpp     20 May 2005 04:10:40 -0000      1.4
+++ offset_test.cpp     26 May 2007 12:42:44 -0000      1.5
@@ -109,7 +109,7 @@
     { return boost::iostreams::put(s, (char) std::tolower(c)); }
 
     template<typename Sink>
-    stream_offset seek(Sink& s, stream_offset off, BOOST_IOS::seekdir way)
+    std::streampos seek(Sink& s, stream_offset off, BOOST_IOS::seekdir way)
     { return boost::iostreams::seek(s, off, way); }
 };
 

Index: putback_test.hpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/iostreams/test/putback_test.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- putback_test.hpp    19 Jun 2005 20:47:37 -0000      1.4
+++ putback_test.hpp    26 May 2007 12:42:44 -0000      1.5
@@ -2,7 +2,7 @@
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
 
-// See http://www.boost.org/libs/iostreams for documentation.
+// See http://www.boost.org/libs/iostreams/ for documentation.
 
 #ifndef BOOST_IOSTREAMS_TEST_PUTBACK_HPP_INCLUDED
 #define BOOST_IOSTREAMS_TEST_PUTBACK_HPP_INCLUDED
@@ -11,86 +11,86 @@
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/iostreams/putback.hpp>
 #include "detail/constants.hpp"
-#include "detail/temp_file.hpp"
-
-using boost::iostreams::test::chunk_size;
-
-bool putback_test_one(std::istream& is)
-{
-    try {
-        do {
-            char buf[chunk_size];
-            is.read(buf, chunk_size);
-            if (is.gcount() < static_cast<std::streamsize>(chunk_size))
-                break;
-            is.putback('a');
-            if (is.get() != 'a')
-                return false;
-        } while (!is.eof());
-        return true;
-    } catch (std::exception&) { return false; }
-}
-
-bool putback_test_two(std::istream& is)
-{
-    try {
-        do {
-            char buf[chunk_size];
-            is.read(buf, chunk_size);
-            if (is.gcount() < static_cast<std::streamsize>(chunk_size))
-                break;
-            is.putback('a');
-            is.putback('b');
-            is.putback('c');
-            is.putback('d');
-            if ( is.get() != 'd' || is.get() != 'c' ||
-                 is.get() != 'b' || is.get() != 'a' )
-            {
-                return false;
-            }
-        } while (!is.eof());
-        return true;
-    } catch (std::exception&) { return false; }
+#include "detail/temp_file.hpp"
+
+using boost::iostreams::test::chunk_size;
+
+bool putback_test_one(std::istream& is)
+{
+    try {
+        do {
+            char buf[chunk_size];
+            is.read(buf, chunk_size);
+            if (is.gcount() < static_cast<std::streamsize>(chunk_size))
+                break;
+            is.putback('a');
+            if (is.get() != 'a')
+                return false;
+        } while (!is.eof());
+        return true;
+    } catch (std::exception&) { return false; }
+}
+
+bool putback_test_two(std::istream& is)
+{
+    try {
+        do {
+            char buf[chunk_size];
+            is.read(buf, chunk_size);
+            if (is.gcount() < static_cast<std::streamsize>(chunk_size))
+                break;
+            is.putback('a');
+            is.putback('b');
+            is.putback('c');
+            is.putback('d');
+            if ( is.get() != 'd' || is.get() != 'c' ||
+                 is.get() != 'b' || is.get() != 'a' )
+            {
+                return false;
+            }
+        } while (!is.eof());
+        return true;
+    } catch (std::exception&) { return false; }
 }
 
 template<typename Source>
-bool putback_test_three(Source& src)
-{
-    try {
-        while (true) {
-            char buf[chunk_size];
-            if (boost::iostreams::read(src, buf, chunk_size) < chunk_size)
-                break;
-            boost::iostreams::putback(src, 'a');
-            if (boost::iostreams::get(src) != 'a')
-                return false;
-        }
-        return true;
-    } catch (std::exception&) { return false; }
-}
+bool putback_test_three(Source& src)
+{
+    try {
+        while (true) {
+            char buf[chunk_size];
+            if (boost::iostreams::read(src, buf, chunk_size) < chunk_size)
+                break;
+            boost::iostreams::putback(src, 'a');
+            if (boost::iostreams::get(src) != 'a')
+                return false;
+        }
+        return true;
+    } catch (std::exception&) { return false; }
+}
 
-template<typename Source>
-bool putback_test_four(Source& src)
-{
-    try {
-        while (true) {
-            char buf[chunk_size];
-            if (boost::iostreams::read(src, buf, chunk_size) < chunk_size)
-                break;
-            boost::iostreams::putback(src, 'a');
-            boost::iostreams::putback(src, 'b');
-            boost::iostreams::putback(src, 'c');
-            boost::iostreams::putback(src, 'd');
-            if ( boost::iostreams::get(src) != 'd' || 
-                 boost::iostreams::get(src) != 'c' ||
-                 boost::iostreams::get(src) != 'b' || 
-                 boost::iostreams::get(src) != 'a' )
-            {
-                return false;
-            }
-        }
-        return true;
-    } catch (std::exception&) { return false; }
+template<typename Source>
+bool putback_test_four(Source& src)
+{
+    try {
+        while (true) {
+            char buf[chunk_size];
+            if (boost::iostreams::read(src, buf, chunk_size) < chunk_size)
+                break;
+            boost::iostreams::putback(src, 'a');
+            boost::iostreams::putback(src, 'b');
+            boost::iostreams::putback(src, 'c');
+            boost::iostreams::putback(src, 'd');
+            if ( boost::iostreams::get(src) != 'd' || 
+                 boost::iostreams::get(src) != 'c' ||
+                 boost::iostreams::get(src) != 'b' || 
+                 boost::iostreams::get(src) != 'a' )
+            {
+                return false;
+            }
+        }
+        return true;
+    } catch (std::exception&) { return false; }
 }
 
 void putback_test()

Index: restrict_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/iostreams/test/restrict_test.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- restrict_test.cpp   26 May 2005 08:59:04 -0000      1.1
+++ restrict_test.cpp   26 May 2007 12:42:44 -0000      1.2
@@ -112,7 +112,7 @@
     { return boost::iostreams::put(s, (char) std::tolower(c)); }
 
     template<typename Sink>
-    stream_offset seek(Sink& s, stream_offset off, BOOST_IOS::seekdir way)
+    std::streampos seek(Sink& s, stream_offset off, BOOST_IOS::seekdir way)
     { return boost::iostreams::seek(s, off, way); }
 };
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to