diff options
author | Stephen M. Webb <stephen@bregmasoft.com> | 2001-07-18 17:58:37 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2001-07-18 17:58:37 +0000 |
commit | fed3b7b43192f7168f083cef98e70555d8898f94 (patch) | |
tree | 5b8039dd8e3565b2f8c58dff6b3f92f7c7ac5803 /libstdc++-v3/testsuite | |
parent | 6a65ea5be3974fda8ad750906ae553914f1c5f0b (diff) | |
download | gcc-fed3b7b43192f7168f083cef98e70555d8898f94.zip gcc-fed3b7b43192f7168f083cef98e70555d8898f94.tar.gz gcc-fed3b7b43192f7168f083cef98e70555d8898f94.tar.bz2 |
ostream.tcc (ostream::put): Fixed error condition check.
2001-07-18 Stephen M. Webb <stephen@bregmasoft..com>
Roman Sulzhyk <roman_sulzhyk@yahoo.com>
libstdc++/3599
* include/bits/ostream.tcc (ostream::put): Fixed error condition check.
* testsuite/27_io/streambuf.cc (test07): Added new regression test.
Co-Authored-By: Roman Sulzhyk <roman_sulzhyk@yahoo.com>
From-SVN: r44122
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/27_io/streambuf.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/streambuf.cc b/libstdc++-v3/testsuite/27_io/streambuf.cc index 038c12c..6845643 100644 --- a/libstdc++-v3/testsuite/27_io/streambuf.cc +++ b/libstdc++-v3/testsuite/27_io/streambuf.cc @@ -337,6 +337,30 @@ namespace gnu class gnu::something_derived : std::streambuf { }; #endif +// libstdc++/3599 +class testbuf2 : public std::streambuf +{ +public: + typedef std::streambuf::traits_type traits_type; + + testbuf2() : std::streambuf() { } + +protected: + int_type + overflow(int_type c = traits_type::eof()) + { return traits_type::not_eof(0); } +}; + +void +test07() +{ + testbuf2 ob; + std::ostream out(&ob); + + VERIFY(out << "gasp"); + VERIFY(out << std::endl); +} + int main() { test01(); @@ -345,5 +369,7 @@ int main() test04(); test05(); + + test07(); return 0; } |