aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-06 03:26:03 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-09 21:31:14 +0300
commit9a81c308f2d4217592630ef41a18a8998bd66f5c (patch)
treee5ab252f90d1b3aa2a2f2775f0f36e569d48b4a5 /tests
parent39101a4383d38c1217c44b999a6e3bd199727c60 (diff)
Add operator<<(ostream, exception)
Diffstat (limited to 'tests')
-rw-r--r--tests/dir-iterator/driver.cxx3
-rw-r--r--tests/link/driver.cxx2
-rw-r--r--tests/manifest-parser/driver.cxx2
-rw-r--r--tests/manifest-roundtrip/driver.cxx3
-rw-r--r--tests/manifest-serializer/driver.cxx2
-rw-r--r--tests/process/driver.cxx2
-rw-r--r--tests/target-triplet/driver.cxx2
7 files changed, 9 insertions, 7 deletions
diff --git a/tests/dir-iterator/driver.cxx b/tests/dir-iterator/driver.cxx
index 62f051b..d3d25b8 100644
--- a/tests/dir-iterator/driver.cxx
+++ b/tests/dir-iterator/driver.cxx
@@ -8,6 +8,7 @@
#include <butl/path>
#include <butl/path-io>
+#include <butl/utility> // operator<<(ostream, exception)
#include <butl/filesystem>
using namespace std;
@@ -62,7 +63,7 @@ main (int argc, const char* argv[])
}
catch (const exception& e)
{
- cerr << argv[1] << ": " << e.what () << endl;
+ cerr << argv[1] << ": " << e << endl;
return 1;
}
}
diff --git a/tests/link/driver.cxx b/tests/link/driver.cxx
index 3171af0..3cade44 100644
--- a/tests/link/driver.cxx
+++ b/tests/link/driver.cxx
@@ -57,7 +57,7 @@ link_dir (const dir_path& target,
}
catch (const system_error& e)
{
- //cerr << e.what () << endl;
+ //cerr << e << endl;
return false;
}
diff --git a/tests/manifest-parser/driver.cxx b/tests/manifest-parser/driver.cxx
index 1068570..76d1579 100644
--- a/tests/manifest-parser/driver.cxx
+++ b/tests/manifest-parser/driver.cxx
@@ -200,7 +200,7 @@ fail (const char* m)
}
catch (const manifest_parsing& e)
{
- //cerr << e.what () << endl;
+ //cerr << e << endl;
}
return true;
diff --git a/tests/manifest-roundtrip/driver.cxx b/tests/manifest-roundtrip/driver.cxx
index cb48e74..69fcf03 100644
--- a/tests/manifest-roundtrip/driver.cxx
+++ b/tests/manifest-roundtrip/driver.cxx
@@ -5,6 +5,7 @@
#include <cassert>
#include <iostream>
+#include <butl/utility> // operator<<(ostream, exception)
#include <butl/fdstream>
#include <butl/manifest-parser>
#include <butl/manifest-serializer>
@@ -46,7 +47,7 @@ main (int argc, char* argv[])
}
catch (const exception& e)
{
- cerr << e.what () << endl;
+ cerr << e << endl;
return 1;
}
}
diff --git a/tests/manifest-serializer/driver.cxx b/tests/manifest-serializer/driver.cxx
index 310e34c..64434c9 100644
--- a/tests/manifest-serializer/driver.cxx
+++ b/tests/manifest-serializer/driver.cxx
@@ -238,7 +238,7 @@ fail (const pairs& m)
}
catch (const manifest_serialization& e)
{
- //cerr << e.what () << endl;
+ //cerr << e << endl;
}
return true;
diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx
index cc806f2..1fb685c 100644
--- a/tests/process/driver.cxx
+++ b/tests/process/driver.cxx
@@ -146,7 +146,7 @@ exec (const path& p,
if (e.child ())
exit (1);
- //cerr << args[0] << ": " << e.what () << endl;
+ //cerr << args[0] << ": " << e << endl;
return false;
}
}
diff --git a/tests/target-triplet/driver.cxx b/tests/target-triplet/driver.cxx
index fe055db..24cd02f 100644
--- a/tests/target-triplet/driver.cxx
+++ b/tests/target-triplet/driver.cxx
@@ -154,7 +154,7 @@ fail (const char* s)
}
catch (invalid_argument& e)
{
- //cerr << e.what () << endl;
+ //cerr << e << endl;
}
return true;