From ed0facd5eeff02d1f827b9ceb6815391fd41084d Mon Sep 17 00:00:00 2001 From: Martin Hierholzer <martin.hierholzer@desy.de> Date: Mon, 4 Jul 2016 11:45:38 +0200 Subject: [PATCH] added trivial check for what() of exceptions --- tests/executables_src/testIllegalNetworks.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/executables_src/testIllegalNetworks.cc b/tests/executables_src/testIllegalNetworks.cc index 60e044ac..d51f66bd 100644 --- a/tests/executables_src/testIllegalNetworks.cc +++ b/tests/executables_src/testIllegalNetworks.cc @@ -80,6 +80,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( testTwoScalarPollPushAccessors, T, test_types ) { BOOST_ERROR("Exception expected."); } catch(ctk::ApplicationExceptionWithID<ctk::ApplicationExceptionID::illegalVariableNetwork> &e) { + BOOST_CHECK_NO_THROW( e.what(); ); } } @@ -97,6 +98,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( testNoFeeder, T, test_types ) { BOOST_ERROR("Exception expected."); } catch(ctk::ApplicationExceptionWithID<ctk::ApplicationExceptionID::illegalVariableNetwork> &e) { + BOOST_CHECK_NO_THROW( e.what(); ); } } @@ -113,6 +115,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( testTwoFeeders, T, test_types ) { BOOST_ERROR("Exception expected."); } catch(ctk::ApplicationExceptionWithID<ctk::ApplicationExceptionID::illegalVariableNetwork> &e) { + BOOST_CHECK_NO_THROW( e.what(); ); } } @@ -132,6 +135,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( testTooManyPollingConsumers, T, test_types ) { BOOST_ERROR("Exception expected."); } catch(ctk::ApplicationExceptionWithID<ctk::ApplicationExceptionID::illegalVariableNetwork> &e) { + BOOST_CHECK_NO_THROW( e.what(); ); } } -- GitLab