aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-13 12:45:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-13 12:45:55 +0300
commit132522ca4c895e9b07d7e323d5529474806e5829 (patch)
tree2c6bafdec5c51941190c3362c5a0200852f89819
parent193efb512ffbc2231ef5c48699d51fbae3f3f9f1 (diff)
Fix stream failures handling in parser/serializer tests
-rw-r--r--tests/parser/driver.cxx3
-rw-r--r--tests/serializer/driver.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/parser/driver.cxx b/tests/parser/driver.cxx
index c1c6f3d..25864aa 100644
--- a/tests/parser/driver.cxx
+++ b/tests/parser/driver.cxx
@@ -41,14 +41,13 @@ main ()
try
{
istringstream is ("<root/>");
- is.exceptions (ios_base::badbit | ios_base::failbit);
parser p (is, "test");
is.setstate (ios_base::badbit);
p.next ();
assert (false);
}
- catch (const ios_base::failure&)
+ catch (const xml::exception&)
{
}
diff --git a/tests/serializer/driver.cxx b/tests/serializer/driver.cxx
index 796a384..8db3361 100644
--- a/tests/serializer/driver.cxx
+++ b/tests/serializer/driver.cxx
@@ -37,7 +37,6 @@ main ()
try
{
ostringstream os;
- os.exceptions (ios_base::badbit | ios_base::failbit);
serializer s (os, "test");
s.start_element ("root");
@@ -46,7 +45,7 @@ main ()
s.characters ("two");
assert (false);
}
- catch (const ios_base::failure&)
+ catch (const xml::exception&)
{
}