Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Public Attributes | List of all members
Mezzanine::Testing::TestData Struct Reference

The information about a test and how to easily find it in the filesystem. More...

#include <testdata.h>

+ Collaboration diagram for Mezzanine::Testing::TestData:

Public Member Functions

 TestData (const String &Name="", TestResult Result=Testing::Success, const String &FuncName="", const String &File="", Mezzanine::Whole Line=0)
 Create a TestData. More...
 
 TestData (pugi::xml_node Node)
 Create Test data from xml. More...
 
String GetAsXML () const
 Return a snippet of xml describing this TestData. More...
 
bool operator< (const TestData &Rhs) const
 Used to sort TestData in std::std and other sorted containers, by TestName. More...
 

Public Attributes

Mezzanine::String FileName
 The File The test happened in.
 
Mezzanine::String FunctionName
 The function the test was called from.
 
Mezzanine::Whole LineNumber
 What line in the file this test occurred when the test was compiled.
 
TestResult Results
 How did the test turn out.
 
Mezzanine::String TestName
 The name of a given test.
 

Detailed Description

The information about a test and how to easily find it in the filesystem.

Definition at line 64 of file testdata.h.

Constructor & Destructor Documentation

Mezzanine::Testing::TestData::TestData ( const String Name = "",
TestResult  Result = Testing::Success,
const String FuncName = "",
const String File = "",
Mezzanine::Whole  Line = 0 
)

Create a TestData.

Parameters
Namethe name of the test, defaults to "".
ResultA TestResult, defaults to Testing::Success.
FuncNameThe name of the function this test was called from, Defaults to "".
FileThe name of the file in which the test exists, Defaults to "".
LineThe line in the file in which the test exists, Defaults to 0.

Definition at line 61 of file testdata.cpp.

Mezzanine::Testing::TestData::TestData ( pugi::xml_node  Node)

Create Test data from xml.

Parameters
NodeThe XMl node to create this from

Definition at line 69 of file testdata.cpp.

Member Function Documentation

String Mezzanine::Testing::TestData::GetAsXML ( ) const

Return a snippet of xml describing this TestData.

Returns
A String with a single XML element with an attribute for each of the TestName, Results, FunctionName, FileName, LineNumber

Definition at line 80 of file testdata.cpp.

bool Mezzanine::Testing::TestData::operator< ( const TestData Rhs) const

Used to sort TestData in std::std and other sorted containers, by TestName.

Parameters
Rhsthe right hand operand when using the less than comparison operator.
Returns
A bool with the same value as this->TestName < Rhs.TestName.

Definition at line 77 of file testdata.cpp.


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