2 Nov
2006
2 Nov
'06
10:07 p.m.
I am finding that the BOOST_CHECK_THROW is not catching an exception class I made. Below is how I am calling it: void test_read_FAIL_EMPTY_READ () { boost::uint32_t size = 0; boost::uint8_t* data = 0; boost::uint32_t length = 5; Memory_Map a_ref ( size ); BOOST_CHECK_THROW ( a_ref.read ( data, length ), errors::IO_Exception ); } The read function is suppose to throw an errors::IO_Exception(int) when it finds out that the length of the read exceeds the length of the Memory_Map. What I am finding out is that the exception is being thrown but no message from Boost telling me that exception errors::IO_Exception has occurred and calling this test a success. Have I used the wrong macro? Stephen