Author: sebor
Date: Wed Oct 10 18:19:40 2007
New Revision: 583655
URL: http://svn.apache.org/viewvc?rev=583655&view=rev
Log:
2007-10-10 Martin Sebor <[EMAIL PROTECTED]>
* 21.string.io.stdcxx-206.cpp: Regression test for STDCXX-206.
Added:
incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp (with
props)
Added: incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp?rev=583655&view=auto
==============================================================================
--- incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp (added)
+++ incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp Wed Oct 10
18:19:40 2007
@@ -0,0 +1,24 @@
+#include <strstream>
+#include <string>
+#include <cassert>
+
+int main ()
+{
+ std::string str ("abcdefghijk");
+
+ char buf[10];
+ std::ostrstream os (buf, sizeof(buf));
+ const std::streamsize width = 2;
+
+ os.width (width);
+ os.exceptions (std::ios_base::failbit | std::ios_base::badbit);
+
+ try {
+ os << str;
+ }
+ catch (std::ios_base::failure&) {
+ }
+
+ assert (0 == os.width ());
+ return 0;
+}
Propchange: incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/stdcxx/trunk/tests/regress/21.string.io.stdcxx-206.cpp
------------------------------------------------------------------------------
svn:keywords = Id