AssertException.cpp 576 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "AssertException.h"
  2. #include <cstring>
  3. namespace UnitTest {
  4. AssertException::AssertException(char const* description, char const* filename, int lineNumber)
  5. : m_lineNumber(lineNumber)
  6. {
  7. using namespace std;
  8. strcpy(m_description, description);
  9. strcpy(m_filename, filename);
  10. }
  11. AssertException::~AssertException() throw()
  12. {
  13. }
  14. char const* AssertException::what() const throw()
  15. {
  16. return m_description;
  17. }
  18. char const* AssertException::Filename() const
  19. {
  20. return m_filename;
  21. }
  22. int AssertException::LineNumber() const
  23. {
  24. return m_lineNumber;
  25. }
  26. }