CppTest  Version 2.0.0
Public Member Functions | Friends | List of all members
Test::Source Class Reference

#include <cpptest-source.h>

Public Member Functions

 Source ()
 
 Source (const char *file, unsigned int line, const char *msg)
 
const std::string & file () const
 
unsigned int line () const
 
const std::string & message () const
 
const std::string & suite () const
 
const std::string & test () const
 

Friends

class Suite
 

Detailed Description

Assertment source information.

Contains information about an assertment point.

Constructor & Destructor Documentation

◆ Source() [1/2]

Test::Source::Source ( )

Constructs an invalid source object, which filename and message are empty strings and the line equals zero.

◆ Source() [2/2]

Test::Source::Source ( const char *  file,
unsigned int  line,
const char *  msg 
)

Constructs a source object.

Parameters
fileName of the file containing the failing function.
lineLine where the function starts.
msgExpression (or message) that caused the failure.

Member Function Documentation

◆ file()

const string & Test::Source::file ( ) const
Returns
Name of the file containing the failing function.

Referenced by Test::CompilerOutput::assertment().

◆ line()

unsigned int Test::Source::line ( ) const
Returns
Line where the function starts.

Referenced by Test::CompilerOutput::assertment().

◆ message()

const string & Test::Source::message ( ) const
Returns
Descriptive message.

Referenced by Test::CompilerOutput::assertment().

◆ suite()

const string & Test::Source::suite ( ) const
Returns
Name of the suite, which the test belongs to.

◆ test()

const string & Test::Source::test ( ) const
Returns
Name of failing test.

The documentation for this class was generated from the following files: