CppUnit project page FAQ CppUnit home page

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CppUnit::SourceLine Class Reference
[Creating custom assertionsBrowsing collected test result]

Represents a source line location. More...

#include <SourceLine.h>

List of all members.

Public Methods

 SourceLine ()
 SourceLine (const std::string &fileName, int lineNumber)
virtual ~SourceLine ()
 Destructor. More...

bool isValid () const
int lineNumber () const
std::string fileName () const
bool operator== (const SourceLine &other) const
bool operator!= (const SourceLine &other) const

Private Attributes

std::string m_fileName
int m_lineNumber

Related Functions

(Note that these are not member functions.)

 CPPUNIT_SOURCELINE()
 Constructs a SourceLine object initialized with the location where the macro is expanded. More...


Detailed Description

Represents a source line location.

Used to capture the failure location in assertion.

Use the CPPUNIT_SOURCELINE() macro to construct that object. Typically used when writing an assertion macro in association with Asserter.

See also:
Asserter.


Constructor & Destructor Documentation

CppUnit::SourceLine::SourceLine  
 

CppUnit::SourceLine::SourceLine const std::string &    fileName,
int    lineNumber
 

CppUnit::SourceLine::~SourceLine   [virtual]
 

Destructor.


Member Function Documentation

std::string CppUnit::SourceLine::fileName   const
 

bool CppUnit::SourceLine::isValid   const
 

int CppUnit::SourceLine::lineNumber   const
 

bool CppUnit::SourceLine::operator!= const SourceLine &    other const
 

bool CppUnit::SourceLine::operator== const SourceLine &    other const
 


Member Data Documentation

std::string CppUnit::SourceLine::m_fileName [private]
 

int CppUnit::SourceLine::m_lineNumber [private]
 


The documentation for this class was generated from the following files:
SourceForge Logo hosts this site. Send comments to:
CppUnit Developers