I'm using boost test framework 1.47 and I'm having difficulties testing my exceptions
Here is my exception class
class VideoCaptureException : public std::exception { std::string m_Description; public: VideoCaptureException(const char* description) { m_Description = std::string(description); } VideoCaptureException(const std::string& description) { m_Description = description; } virtual ~VideoCaptureException() throw() {} virtual const char* what() const throw() { return m_Description.c_str(); } } I'm trying to test code that simply throws this exception
BOOST_CHECK_THROW( source.StopCapture(), VideoCaptureException ) For some reason it doesn't work.
unknown location(0): fatal error in "testVideoCaptureSource": unknown type testVideoCaptureSource.cpp(28): last checkpoint What is it that I'm doing wrong?
source.StopCapture()help?