Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81881 - trunk/libs/serialization/test
From: ramey_at_[hidden]
Date: 2012-12-12 14:06:52


Author: ramey
Date: 2012-12-12 14:06:51 EST (Wed, 12 Dec 2012)
New Revision: 81881
URL: http://svn.boost.org/trac/boost/changeset/81881

Log:
altered test to use std::istream_iterator rather than serialization version of same
Text files modified:
   trunk/libs/serialization/test/test_utf8_codecvt.cpp | 41 +++++++++++++++++++--------------------
   1 files changed, 20 insertions(+), 21 deletions(-)

Modified: trunk/libs/serialization/test/test_utf8_codecvt.cpp
==============================================================================
--- trunk/libs/serialization/test/test_utf8_codecvt.cpp (original)
+++ trunk/libs/serialization/test/test_utf8_codecvt.cpp 2012-12-12 14:06:51 EST (Wed, 12 Dec 2012)
@@ -22,7 +22,7 @@
 namespace std{
     using ::size_t;
     using ::wcslen;
-#ifndef UNDER_CE
+#ifndef UNDER_CE && !defined(__PGIC__)
     using ::w_int;
 #endif
 } // namespace std
@@ -40,8 +40,6 @@
 #endif
 
 #include "test_tools.hpp"
-#include <boost/archive/iterators/istream_iterator.hpp>
-#include <boost/archive/iterators/ostream_iterator.hpp>
 
 #include <boost/archive/add_facet.hpp>
 #include <boost/archive/detail/utf8_codecvt_facet.hpp>
@@ -92,19 +90,19 @@
 
 template<>
 wchar_t test_data<4>::wchar_encoding[] = {
- 0x00000001,
- 0x0000007f,
- 0x00000080,
- 0x000007ff,
- 0x00000800,
- 0x0000ffff,
- 0x00010000,
- 0x0010ffff,
- 0x001fffff,
- 0x00200000,
- 0x03ffffff,
- 0x04000000,
- 0x7fffffff
+ (wchar_t)0x00000001,
+ (wchar_t)0x0000007f,
+ (wchar_t)0x00000080,
+ (wchar_t)0x000007ff,
+ (wchar_t)0x00000800,
+ (wchar_t)0x0000ffff,
+ (wchar_t)0x00010000,
+ (wchar_t)0x0010ffff,
+ (wchar_t)0x001fffff,
+ (wchar_t)0x00200000,
+ (wchar_t)0x03ffffff,
+ (wchar_t)0x04000000,
+ (wchar_t)0x7fffffff
 };
 
 int
@@ -132,7 +130,7 @@
                 // so use this instead
                 td::utf8_encoding + 12,
             #endif
- boost::archive::iterators::ostream_iterator<utf8_t>(ofs)
+ std::ostream_iterator<utf8_t>(ofs)
         );
     }
 
@@ -176,13 +174,13 @@
         std::copy(
             from_file.begin(),
             from_file.end(),
- boost::archive::iterators::ostream_iterator<wchar_t>(ofs)
+ std::ostream_iterator<wchar_t, wchar_t>(ofs)
         );
     }
 
     // Make sure that both files are the same
     {
- typedef boost::archive::iterators::istream_iterator<utf8_t> is_iter;
+ typedef std::istream_iterator<utf8_t> is_iter;
         is_iter end_iter;
 
         std::ifstream ifs1("test.dat");
@@ -237,7 +235,7 @@
         std::copy(
             test3_data,
             test3_data + l,
- boost::archive::iterators::ostream_iterator<wchar_t>(ofs)
+ std::ostream_iterator<wchar_t, wchar_t>(ofs)
         );
     }
 
@@ -246,11 +244,12 @@
         std::wifstream ifs;
         ifs.imbue(*utf8_locale);
         ifs.open("test3.dat");
+ ifs >> std::noskipws;
         BOOST_CHECK(
             std::equal(
                 test3_data,
                 test3_data + l,
- boost::archive::iterators::istream_iterator<wchar_t>(ifs)
+ std::istream_iterator<wchar_t, wchar_t>(ifs)
             )
         );
     }


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