summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-10-23 17:01:22 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-10-23 17:01:48 +0100
commit240a2c189d343770035c6ddf9331d6547712c18a (patch)
tree721a740bd068c2393a9b4f86d6f21e8f2cf05cea
parentRename to avoid conflicts (diff)
downloadlibadhocutil-240a2c189d343770035c6ddf9331d6547712c18a.tar.bz2
libadhocutil-240a2c189d343770035c6ddf9331d6547712c18a.tar.xz
libadhocutil-240a2c189d343770035c6ddf9331d6547712c18a.zip
Test exception message formatting
-rw-r--r--libadhocutil/unittests/testFileUtils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libadhocutil/unittests/testFileUtils.cpp b/libadhocutil/unittests/testFileUtils.cpp
index 8d4b38f..00d0a16 100644
--- a/libadhocutil/unittests/testFileUtils.cpp
+++ b/libadhocutil/unittests/testFileUtils.cpp
@@ -27,6 +27,12 @@ BOOST_AUTO_TEST_CASE( mapfail )
}, AdHoc::SystemException);
}
+BOOST_AUTO_TEST_CASE( msg )
+{
+ AdHoc::SystemException x("verb", "No such file or directory", ENOENT);
+ BOOST_REQUIRE_EQUAL(x.what(), "verb (2:No such file or directory)");
+}
+
BOOST_AUTO_TEST_CASE( pathPart )
{
using namespace AdHoc::FileUtils;