diff --git a/livesupport/src/modules/storageClient/src/TestStorageClientTest.cxx b/livesupport/src/modules/storageClient/src/TestStorageClientTest.cxx index d9bf670d8..3283b2f25 100644 --- a/livesupport/src/modules/storageClient/src/TestStorageClientTest.cxx +++ b/livesupport/src/modules/storageClient/src/TestStorageClientTest.cxx @@ -74,7 +74,7 @@ static const std::string configFileName = "etc/testStorage.xml"; * Set up the test environment *----------------------------------------------------------------------------*/ void -TestStorageClientTest :: setUp(void) throw () +TestStorageClientTest :: setUp(void) throw (CPPUNIT_NS::Exception) { try { Ptr::Ref parser( diff --git a/livesupport/src/modules/storageClient/src/TestStorageClientTest.h b/livesupport/src/modules/storageClient/src/TestStorageClientTest.h index a238c4edf..8069fff3a 100644 --- a/livesupport/src/modules/storageClient/src/TestStorageClientTest.h +++ b/livesupport/src/modules/storageClient/src/TestStorageClientTest.h @@ -167,7 +167,7 @@ class TestStorageClientTest : public CPPUNIT_NS::TestFixture * Set up the environment for the test case. */ void - setUp(void) throw (); + setUp(void) throw (CPPUNIT_NS::Exception); /** * Clean up the environment after the test case. diff --git a/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx b/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx index b526aeb38..a82662e73 100644 --- a/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx +++ b/livesupport/src/modules/storageClient/src/WebStorageClientTest.cxx @@ -89,7 +89,7 @@ static const std::string authenticationFactoryConfigFileName * Set up the test environment *----------------------------------------------------------------------------*/ void -WebStorageClientTest :: setUp(void) throw () +WebStorageClientTest :: setUp(void) throw (CPPUNIT_NS::Exception) { Ptr::Ref acf; acf = AuthenticationClientFactory::getInstance(); @@ -101,9 +101,15 @@ WebStorageClientTest :: setUp(void) throw () acf->configure(*root); } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in authentication configuration file"); + std::string eMsg = "semantic error in " + "authentication configuration file:\n"; + eMsg += e.what(); + CPPUNIT_FAIL(eMsg); } catch (xmlpp::exception &e) { - CPPUNIT_FAIL("error parsing authentication configuration file"); + std::string eMsg = "error parsing " + "authentication configuration file:\n"; + eMsg += e.what(); + CPPUNIT_FAIL(eMsg); } authentication = acf->getAuthenticationClient(); @@ -116,12 +122,21 @@ WebStorageClientTest :: setUp(void) throw () wsc.reset(new WebStorageClient()); wsc->configure(*root); - wsc->reset(); } catch (std::invalid_argument &e) { - CPPUNIT_FAIL("semantic error in storage configuration file"); + std::string eMsg = "semantic error in " + "authentication configuration file:\n"; + eMsg += e.what(); + CPPUNIT_FAIL(eMsg); } catch (xmlpp::exception &e) { - CPPUNIT_FAIL("error parsing storage configuration file"); + std::string eMsg = "error parsing " + "authentication configuration file:\n"; + eMsg += e.what(); + CPPUNIT_FAIL(eMsg); } + + CPPUNIT_ASSERT_NO_THROW( + wsc->reset() + ); } diff --git a/livesupport/src/modules/storageClient/src/WebStorageClientTest.h b/livesupport/src/modules/storageClient/src/WebStorageClientTest.h index 65f1ae0c4..517c9d16a 100644 --- a/livesupport/src/modules/storageClient/src/WebStorageClientTest.h +++ b/livesupport/src/modules/storageClient/src/WebStorageClientTest.h @@ -173,7 +173,7 @@ class WebStorageClientTest : public BaseTestMethod * Set up the environment for the test case. */ void - setUp(void) throw (); + setUp(void) throw (CPPUNIT_NS::Exception); /** * Clean up the environment after the test case.