summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-21 18:17:13 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-05-21 18:17:13 +0100
commiteb618f23b19c71f4a575810062700314e26d3bd2 (patch)
tree9c1c801e6dab4e41c9e97074a5e457be9be5fb55 /test
parentExclude don't print helper from coverage (diff)
downloadmygrate-eb618f23b19c71f4a575810062700314e26d3bd2.tar.bz2
mygrate-eb618f23b19c71f4a575810062700314e26d3bd2.tar.xz
mygrate-eb618f23b19c71f4a575810062700314e26d3bd2.zip
Add test file for odds and ends
Diffstat (limited to 'test')
-rw-r--r--test/Jamfile.jam1
-rw-r--r--test/test-misc.cpp12
2 files changed, 13 insertions, 0 deletions
diff --git a/test/Jamfile.jam b/test/Jamfile.jam
index e6a833a..3c479b9 100644
--- a/test/Jamfile.jam
+++ b/test/Jamfile.jam
@@ -9,3 +9,4 @@ project : requirements
run test-rawDataReader.cpp ;
run test-bitset.cpp ;
run test-streams.cpp ;
+run test-misc.cpp ;
diff --git a/test/test-misc.cpp b/test/test-misc.cpp
new file mode 100644
index 0000000..cc9154a
--- /dev/null
+++ b/test/test-misc.cpp
@@ -0,0 +1,12 @@
+#define BOOST_TEST_MODULE BitSet
+#include <boost/test/unit_test.hpp>
+
+#include <helpers.h>
+#include <stdexcept>
+
+BOOST_AUTO_TEST_CASE(verify)
+{
+ BOOST_CHECK_NO_THROW(MyGrate::verify<std::runtime_error>(true, "no throw"));
+ BOOST_CHECK_THROW(MyGrate::verify<std::runtime_error>(false, "throw re"), std::runtime_error);
+ BOOST_CHECK_THROW(MyGrate::verify<std::logic_error>(false, "throw le"), std::logic_error);
+}