/[projet1]/public/pc/shared_libraries/unittestcpp/v1.4/src/AssertException.cpp
Defence Force logotype

Diff of /public/pc/shared_libraries/unittestcpp/v1.4/src/AssertException.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1325 by dbug, Mon Jul 13 12:20:10 2009 UTC revision 1326 by dbug, Sat Oct 24 17:16:43 2015 UTC
# Line 1  Line 1 
1  #include "AssertException.h"  #include "AssertException.h"
2  #include <cstring>  #include <cstring>
3    
4  namespace UnitTest {  namespace UnitTest
   
 AssertException::AssertException(char const* description, char const* filename, int lineNumber)  
     : m_lineNumber(lineNumber)  
5  {  {
         using namespace std;  
6    
7      strcpy(m_description, description);    AssertException::AssertException(char const* description, char const* filename, int lineNumber)
8      strcpy(m_filename, filename);      : m_lineNumber(lineNumber)
9  }    {
10        using namespace std;
11    
12  AssertException::~AssertException() throw()      strncpy(m_description, description,sizeof(m_description));
13  {      m_description[sizeof(m_description)-1]=0;
14  }      strncpy(m_filename, filename,sizeof(m_filename));
15        m_filename[sizeof(m_filename)-1]=0;
16      }
17    
18      AssertException::~AssertException() throw()
19      {
20      }
21    
22  char const* AssertException::what() const throw()    char const* AssertException::what() const throw()
23  {    {
24      return m_description;      return m_description;
25  }    }
26    
27  char const* AssertException::Filename() const    char const* AssertException::Filename() const
28  {    {
29      return m_filename;      return m_filename;
30  }    }
31    
32  int AssertException::LineNumber() const    int AssertException::LineNumber() const
33  {    {
34      return m_lineNumber;      return m_lineNumber;
35  }    }
36    
37  }  }

Legend:
Removed from v.1325  
changed lines
  Added in v.1326

  ViewVC Help
Powered by ViewVC 1.1.26