From 9092b9277bc31172cc326c6c27a39e6a7536ea3d Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 2 Jun 2013 20:00:04 +0000 Subject: [PATCH] Added a test for long padding. [SVN r84613] --- test/string_ref_test_io.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/string_ref_test_io.cpp b/test/string_ref_test_io.cpp index d4a288d..376f695 100644 --- a/test/string_ref_test_io.cpp +++ b/test/string_ref_test_io.cpp @@ -107,6 +107,17 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(padding, CharT, char_types) 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;