|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Test exception.
|
|
|
// Test exception.
|
|
|
try {
|
|
|
try {
|
|
|
|
|
|
child.writer.exceptions(std::ostream::failbit | std::ostream::badbit);
|
|
|
child.writer << bufSize;
|
|
|
child.writer << bufSize;
|
|
|
child.writer.flush();
|
|
|
child.writer.flush();
|
|
|
NO_EXCEPTION_TERM(" writer called without run()");
|
|
|
NO_EXCEPTION_TERM(" writer called without run()");
|
|
|
|
|
|
|
|
|
// Test exception.
|
|
|
// Test exception.
|
|
|
try {
|
|
|
try {
|
|
|
int temp;
|
|
|
int temp;
|
|
|
|
|
|
child.reader.exceptions(std::istream::failbit | std::istream::badbit);
|
|
|
child.reader >> temp;
|
|
|
child.reader >> temp;
|
|
|
NO_EXCEPTION_TERM(" reader called without run()");
|
|
|
NO_EXCEPTION_TERM(" reader called without run()");
|
|
|
return false;
|
|
|
return false;
|