|
Boost-Commit : |
From: Frank.Birbacher_at_[hidden]
Date: 2007-11-02 16:21:25
Author: birbacher
Date: 2007-11-02 16:21:24 EDT (Fri, 02 Nov 2007)
New Revision: 40696
URL: http://svn.boost.org/trac/boost/changeset/40696
Log:
fixed signedness of variable and cleaned up whitespace
Text files modified:
sandbox-branches/birbacher/fix_iostreams/libs/iostreams/test/code_converter_test.cpp | 300 ++++++++++++++++++++--------------------
1 files changed, 150 insertions(+), 150 deletions(-)
Modified: sandbox-branches/birbacher/fix_iostreams/libs/iostreams/test/code_converter_test.cpp
==============================================================================
--- sandbox-branches/birbacher/fix_iostreams/libs/iostreams/test/code_converter_test.cpp (original)
+++ sandbox-branches/birbacher/fix_iostreams/libs/iostreams/test/code_converter_test.cpp 2007-11-02 16:21:24 EDT (Fri, 02 Nov 2007)
@@ -22,7 +22,7 @@
#if !defined(__COMO__) || !defined(BOOST_COMO_STRICT)
# if defined(BOOST_IOSTREAMS_NO_LIB) || defined(BOOST_ALL_NO_LIB)
# include "../src/file_descriptor.cpp"
-# else
+# else
# include <boost/iostreams/device/file_descriptor.hpp>
# endif
#endif
@@ -36,75 +36,75 @@
#include "detail/null_padded_codecvt.hpp"
#include "detail/utf8_codecvt_facet.hpp"
#ifdef BOOST_IOSTREAMS_USE_DINKUM_COREX
-# include <codecvt/8859_1>
-# include <codecvt/8859_10>
-# include <codecvt/8859_13>
-# include <codecvt/8859_14>
-# include <codecvt/8859_15>
-# include <codecvt/8859_16>
-# include <codecvt/8859_2>
-# include <codecvt/8859_3>
-# include <codecvt/8859_4>
-# include <codecvt/8859_5>
-# include <codecvt/8859_6>
-# include <codecvt/8859_7>
-# include <codecvt/8859_8>
-# include <codecvt/8859_9>
-# include <codecvt/baltic>
-# include <codecvt/big5>
-# include <codecvt/cp037>
-# include <codecvt/cp1006>
-# include <codecvt/cp1026>
-# include <codecvt/cp1250>
-# include <codecvt/cp1251>
-# include <codecvt/cp1252>
-# include <codecvt/cp1253>
-# include <codecvt/cp1254>
-# include <codecvt/cp1255>
-# include <codecvt/cp1256>
-# include <codecvt/cp1257>
-# include <codecvt/cp1258>
-# include <codecvt/cp424>
-# include <codecvt/cp437>
-# include <codecvt/cp500>
-# include <codecvt/cp737>
-# include <codecvt/cp775>
-# include <codecvt/cp850>
-# include <codecvt/cp852>
-# include <codecvt/cp855>
-# include <codecvt/cp856>
-# include <codecvt/cp857>
-# include <codecvt/cp860>
-# include <codecvt/cp861>
-# include <codecvt/cp862>
-# include <codecvt/cp863>
-# include <codecvt/cp864>
-# include <codecvt/cp865>
-# include <codecvt/cp866>
-# include <codecvt/cp869>
-# include <codecvt/cp874>
-# include <codecvt/cp875>
-# include <codecvt/cp932>
-# include <codecvt/cp936>
-# include <codecvt/cp949>
-# include <codecvt/cp950>
-# include <codecvt/cyrillic>
-# include <codecvt/ebcdic>
-# include <codecvt/euc>
-# include <codecvt/euc_0208>
-# include <codecvt/gb12345>
-# include <codecvt/gb2312>
-# include <codecvt/greek>
-# include <codecvt/iceland>
-# include <codecvt/jis>
-# include <codecvt/jis_0208>
-# include <codecvt/jis0201>
-# include <codecvt/ksc5601>
-# include <codecvt/latin2>
-# include <codecvt/one_one>
-# include <codecvt/roman>
-# include <codecvt/sjis>
-# include <codecvt/sjis_0208>
+# include <codecvt/8859_1>
+# include <codecvt/8859_10>
+# include <codecvt/8859_13>
+# include <codecvt/8859_14>
+# include <codecvt/8859_15>
+# include <codecvt/8859_16>
+# include <codecvt/8859_2>
+# include <codecvt/8859_3>
+# include <codecvt/8859_4>
+# include <codecvt/8859_5>
+# include <codecvt/8859_6>
+# include <codecvt/8859_7>
+# include <codecvt/8859_8>
+# include <codecvt/8859_9>
+# include <codecvt/baltic>
+# include <codecvt/big5>
+# include <codecvt/cp037>
+# include <codecvt/cp1006>
+# include <codecvt/cp1026>
+# include <codecvt/cp1250>
+# include <codecvt/cp1251>
+# include <codecvt/cp1252>
+# include <codecvt/cp1253>
+# include <codecvt/cp1254>
+# include <codecvt/cp1255>
+# include <codecvt/cp1256>
+# include <codecvt/cp1257>
+# include <codecvt/cp1258>
+# include <codecvt/cp424>
+# include <codecvt/cp437>
+# include <codecvt/cp500>
+# include <codecvt/cp737>
+# include <codecvt/cp775>
+# include <codecvt/cp850>
+# include <codecvt/cp852>
+# include <codecvt/cp855>
+# include <codecvt/cp856>
+# include <codecvt/cp857>
+# include <codecvt/cp860>
+# include <codecvt/cp861>
+# include <codecvt/cp862>
+# include <codecvt/cp863>
+# include <codecvt/cp864>
+# include <codecvt/cp865>
+# include <codecvt/cp866>
+# include <codecvt/cp869>
+# include <codecvt/cp874>
+# include <codecvt/cp875>
+# include <codecvt/cp932>
+# include <codecvt/cp936>
+# include <codecvt/cp949>
+# include <codecvt/cp950>
+# include <codecvt/cyrillic>
+# include <codecvt/ebcdic>
+# include <codecvt/euc>
+# include <codecvt/euc_0208>
+# include <codecvt/gb12345>
+# include <codecvt/gb2312>
+# include <codecvt/greek>
+# include <codecvt/iceland>
+# include <codecvt/jis>
+# include <codecvt/jis_0208>
+# include <codecvt/jis0201>
+# include <codecvt/ksc5601>
+# include <codecvt/latin2>
+# include <codecvt/one_one>
+# include <codecvt/roman>
+# include <codecvt/sjis>
+# include <codecvt/sjis_0208>
# include <codecvt/turkish>
# include <codecvt/utf16>
# include <codecvt/utf8>
@@ -118,7 +118,7 @@
using namespace boost::iostreams;
using namespace boost::iostreams::detail;
using namespace boost::iostreams::test;
-using boost::unit_test::test_suite;
+using boost::unit_test::test_suite;
namespace io = boost::iostreams;
const int max_length = 30;
@@ -144,9 +144,9 @@
template<typename Codecvt>
basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
codecvt_intern<Codecvt>::type
->
+>
test_string()
{
typedef typename codecvt_intern<Codecvt>::type intern_type;
@@ -155,7 +155,7 @@
if (valid_char<Codecvt>(c))
pattern += c;
result.reserve(pattern.size() * pattern_reps);
- for (int w = 0; w < pattern_reps; ++w)
+ for (unsigned int w = 0; w < pattern_reps; ++w)
result += pattern;
return result;
}
@@ -167,7 +167,7 @@
typedef io::file_descriptor_sink classic_file_sink;
#else
struct classic_file_source : io::source {
- classic_file_source(const std::string& path)
+ classic_file_source(const std::string& path)
: file_(new filebuf)
{
file_->pubimbue(locale::classic());
@@ -178,7 +178,7 @@
};
struct classic_file_sink : io::sink {
- classic_file_sink(const std::string& path)
+ classic_file_sink(const std::string& path)
: file_(new filebuf)
{
file_->pubimbue(locale::classic());
@@ -193,7 +193,7 @@
bool codecvt_test1()
{
typedef basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
codecvt_intern<Codecvt>::type
> string_type;
typedef code_converter<classic_file_source, Codecvt> wide_file_source;
@@ -217,7 +217,7 @@
bool codecvt_test2()
{
typedef basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
codecvt_intern<Codecvt>::type
> string_type;
typedef code_converter<classic_file_source> wide_file_source;
@@ -242,8 +242,8 @@
template<typename Codecvt>
bool codecvt_test()
-{
- return codecvt_test1<Codecvt>() && codecvt_test2<Codecvt>();
+{
+ return codecvt_test1<Codecvt>() && codecvt_test2<Codecvt>();
}
void code_converter_test()
@@ -253,75 +253,75 @@
BOOST_CHECK(codecvt_test<stateless_null_padded_codecvt>());
#ifdef BOOST_IOSTREAMS_USE_DINKUM_COREX
using namespace Dinkum::conversions;
- BOOST_CHECK(codecvt_test< codecvt_8859_1<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_10<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_13<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_14<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_15<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_16<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_2<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_3<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_4<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_5<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_6<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_7<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_8<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_9<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_baltic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_big5<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp037<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1006<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1026<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1250<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1251<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1252<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1253<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1254<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1255<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1256<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1257<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1258<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp424<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp437<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp500<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp737<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp775<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp850<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp852<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp855<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp856<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp857<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp860<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp861<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp862<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp863<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp864<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp865<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp866<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp869<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp874<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp875<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp932<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp936<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp949<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp950<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cyrillic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_ebcdic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_euc<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_euc_0208<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_gb12345<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_gb2312<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_greek<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_iceland<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis_0208<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis0201<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_ksc5601<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_latin2<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_one_one<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_roman<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_sjis<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_sjis_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_1<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_10<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_13<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_14<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_15<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_16<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_2<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_3<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_4<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_5<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_6<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_7<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_8<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_9<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_baltic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_big5<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp037<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1006<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1026<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1250<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1251<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1252<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1253<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1254<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1255<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1256<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1257<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1258<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp424<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp437<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp500<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp737<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp775<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp850<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp852<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp855<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp856<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp857<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp860<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp861<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp862<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp863<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp864<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp865<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp866<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp869<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp874<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp875<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp932<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp936<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp949<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp950<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cyrillic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_ebcdic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_euc<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_euc_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_gb12345<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_gb2312<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_greek<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_iceland<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis0201<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_ksc5601<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_latin2<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_one_one<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_roman<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_sjis<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_sjis_0208<wchar_t> >());
BOOST_CHECK(codecvt_test< codecvt_turkish<wchar_t> >());
BOOST_CHECK(codecvt_test< codecvt_utf16<wchar_t> >());
BOOST_CHECK(codecvt_test< codecvt_utf8<wchar_t> >());
@@ -329,7 +329,7 @@
#endif
}
-test_suite* init_unit_test_suite(int, char* [])
+test_suite* init_unit_test_suite(int, char* [])
{
test_suite* test = BOOST_TEST_SUITE("code_converter test");
test->add(BOOST_TEST_CASE(&code_converter_test));
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