diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-29 13:31:51 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-29 13:31:51 +0000 |
commit | ae03149b4a349e352c831bd9108e9aa3f7f27d26 (patch) | |
tree | e327612ccbae09d82d0361093a42061e788b5e5a /libstdc++-v3 | |
parent | dddafd797e4243201916a92e6ea6f55ca860be91 (diff) | |
download | gcc-ae03149b4a349e352c831bd9108e9aa3f7f27d26.tar.gz |
PR libstdc++/67583 Fix invalid sputn calls in tests
PR libstdc++/67583
* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Fix sputn call
with mismatched arguments.
* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ad951e276d9..4408e462f5a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2015-09-29 Jonathan Wakely <jwakely@redhat.com> + PR libstdc++/67583 + * testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Fix sputn call + with mismatched arguments. + * testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc: Likewise. + PR libstdc++/65393 * config/abi/pre/gnu.ver: Export new symbols. * include/std/thread (thread::_State, thread::_State_impl): New types. diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc index ddc6d97aba0..2cd7696d5bc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc @@ -88,8 +88,10 @@ void test04() VERIFY( strmsz_2 != strmsz_1 ); VERIFY( strmsz_2 == 1 ); // end part three + str_tmp = " ravi shankar meets carlos santana in LoHa "; + str_tmp += str_tmp; strmsz_1 = strb_01.str().size(); - strmsz_2 = strb_01.sputn(" ravi shankar meets carlos santana in LoHa", 90); + strmsz_2 = strb_01.sputn(str_tmp.c_str(), str_tmp.size()); strb_01.pubseekoff(0, std::ios_base::end); strb_01.sputc('<'); str_tmp = strb_01.str(); diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc index 8678536ec41..0dd0974f284 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc @@ -88,8 +88,10 @@ void test04() VERIFY( strmsz_2 != strmsz_1 ); VERIFY( strmsz_2 == 1 ); // end part three + str_tmp = L" ravi shankar meets carlos santana in LoHa "; + str_tmp += str_tmp; strmsz_1 = strb_01.str().size(); - strmsz_2 = strb_01.sputn(L" ravi shankar meets carlos santana in LoHa", 90); + strmsz_2 = strb_01.sputn(str_tmp.c_str(), str_tmp.size()); strb_01.pubseekoff(0, std::ios_base::end); strb_01.sputc(L'<'); str_tmp = strb_01.str(); |