Commit 45cbe93c by Paolo Carlini Committed by Paolo Carlini

9182-2.cc: Make sure the exception is actually thrown.

2004-02-14  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Make
	sure the exception is actually thrown.
	* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
	* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
	* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.

From-SVN: r77828
parent 45cfeb06
2004-02-14 Paolo Carlini <pcarlini@suse.de> 2004-02-14 Paolo Carlini <pcarlini@suse.de>
* testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Make
sure the exception is actually thrown.
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc: Ditto.
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc: Ditto.
* testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Ditto.
2004-02-14 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13858 PR libstdc++/13858
* include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external): * include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external):
In case of conversion errors, throw ios_failure; simplify. In case of conversion errors, throw ios_failure; simplify.
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <fstream> #include <fstream>
#include <locale> #include <locale>
#include <testsuite_hooks.h>
const char name_07[] = "filebuf_virtuals-7.txt"; // empty file, need to create const char name_07[] = "filebuf_virtuals-7.txt"; // empty file, need to create
...@@ -63,6 +64,7 @@ void test14() ...@@ -63,6 +64,7 @@ void test14()
{ {
fbuf1.sputn("onne", 4); fbuf1.sputn("onne", 4);
fbuf1.close(); fbuf1.close();
VERIFY( false );
} }
catch (exception&) catch (exception&)
{ {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
// 27.8.1.4 Overridden virtual functions // 27.8.1.4 Overridden virtual functions
#include <fstream> #include <fstream>
#include <testsuite_hooks.h>
void test03() void test03()
{ {
...@@ -36,6 +37,7 @@ void test03() ...@@ -36,6 +37,7 @@ void test03()
// seekoff should flush the output sequence, which will fail // seekoff should flush the output sequence, which will fail
// if the output buffer contains illegal characters. // if the output buffer contains illegal characters.
fb.pubseekoff(0, ios_base::cur); fb.pubseekoff(0, ios_base::cur);
VERIFY( false );
} }
catch (exception&) catch (exception&)
{ {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <locale> #include <locale>
#include <fstream> #include <fstream>
#include <testsuite_hooks.h>
void test01() void test01()
{ {
...@@ -36,6 +37,7 @@ void test01() ...@@ -36,6 +37,7 @@ void test01()
try try
{ {
fb.pubseekpos(pos); fb.pubseekpos(pos);
VERIFY( false );
} }
catch (exception&) catch (exception&)
{ {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <fstream> #include <fstream>
#include <locale> #include <locale>
#include <testsuite_hooks.h>
const char name_07[] = "filebuf_virtuals-7.txt"; // empty file, need to create const char name_07[] = "filebuf_virtuals-7.txt"; // empty file, need to create
...@@ -62,7 +63,7 @@ void test13() ...@@ -62,7 +63,7 @@ void test13()
{ {
fbuf1.sputn("ison", 4); fbuf1.sputn("ison", 4);
fbuf1.pubsync(); fbuf1.pubsync();
fbuf1.close(); VERIFY( false );
} }
catch (exception&) catch (exception&)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment