1
#ifndef CPPUNIT_SOURCELINE_H
2
#define CPPUNIT_SOURCELINE_H
4
#include <cppunit/Portability.h>
7
/*! \brief Constructs a SourceLine object initialized with the location where the macro is expanded.
8
* \ingroup CreatingNewAssertions
9
* \relates CppUnit::SourceLine
10
* Used to write your own assertion macros.
11
* \see Asserter for example of usage.
13
#define CPPUNIT_SOURCELINE() CPPUNIT_NS::SourceLine( __FILE__, __LINE__ )
19
/*! \brief Represents a source line location.
20
* \ingroup CreatingNewAssertions
21
* \ingroup BrowsingCollectedTestResult
23
* Used to capture the failure location in assertion.
25
* Use the CPPUNIT_SOURCELINE() macro to construct that object. Typically used when
26
* writing an assertion macro in association with Asserter.
30
class CPPUNIT_API SourceLine
35
SourceLine( const std::string &fileName,
39
virtual ~SourceLine();
43
int lineNumber() const;
45
std::string fileName() const;
47
bool operator ==( const SourceLine &other ) const;
48
bool operator !=( const SourceLine &other ) const;
51
std::string m_fileName;
58
#endif // CPPUNIT_SOURCELINE_H