From 240a2c189d343770035c6ddf9331d6547712c18a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Oct 2016 17:01:22 +0100 Subject: Test exception message formatting --- libadhocutil/unittests/testFileUtils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3