Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84613 - trunk/libs/utility/test
From: andrey.semashev_at_[hidden]
Date: 2013-06-02 16:00:04


Author: andysem
Date: 2013-06-02 16:00:04 EDT (Sun, 02 Jun 2013)
New Revision: 84613
URL: http://svn.boost.org/trac/boost/changeset/84613

Log:
Added a test for long padding.
Text files modified:
   trunk/libs/utility/test/string_ref_test_io.cpp | 11 +++++++++++
   1 files changed, 11 insertions(+), 0 deletions(-)

Modified: trunk/libs/utility/test/string_ref_test_io.cpp
==============================================================================
--- trunk/libs/utility/test/string_ref_test_io.cpp (original)
+++ trunk/libs/utility/test/string_ref_test_io.cpp 2013-06-02 16:00:04 EDT (Sun, 02 Jun 2013)
@@ -107,6 +107,17 @@
         BOOST_CHECK(strm_ref.str() == strm_correct.str());
     }
 
+ // Test for long padding
+ {
+ ostream_type strm_ref;
+ strm_ref << ctx.begin << std::setw(100) << string_ref_type(ctx.abcd) << ctx.end;
+
+ ostream_type strm_correct;
+ strm_correct << ctx.begin << std::setw(100) << ctx.abcd << ctx.end;
+
+ BOOST_CHECK(strm_ref.str() == strm_correct.str());
+ }
+
     // Test that short width does not truncate the string
     {
         ostream_type strm_ref;


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