edbee - Qt Editor Library
Public Types | Public Member Functions | List of all members
edbee::test::TestResult Class Reference

This method represents a test result. More...

#include <test.h>

+ Collaboration diagram for edbee::test::TestResult:

Public Types

enum  Status { Passed, Failed, Skipped }
 

Public Member Functions

 TestResult (TestCase *testCase, const QString &methodName, const QString &description, const char *file, int lineNumber)
 A single test result. More...
 
virtual ~TestResult ()
 
virtual void setBooleanResult (bool result, const char *statement)
 Sets the result and the state of the test. More...
 
virtual void setCompareResult (bool result, const QString &actualValue, const QString &expectedValue, const char *actualStatement, const char *expectedStatement)
 Sets a compare result. More...
 
virtual void setSkip ()
 A skip test result. More...
 
virtual TestCasetestCae ()
 
virtual QString methodName ()
 
virtual QString description ()
 
virtual const char * fileName ()
 
virtual int lineNumber ()
 
virtual bool compareStatement ()
 
virtual const char * actualStatement ()
 
virtual const char * statement ()
 
virtual const char * expectedStatement ()
 
virtual QString actualValue ()
 
virtual QString expectedValue ()
 
virtual Status status ()
 

Detailed Description

This method represents a test result.

Member Enumeration Documentation

◆ Status

Enumerator
Passed 
Failed 
Skipped 

Constructor & Destructor Documentation

◆ TestResult()

edbee::test::TestResult::TestResult ( TestCase testCase,
const QString &  methodName,
const QString &  description,
const char *  file,
int  lineNumber 
)
explicit

A single test result.

Parameters
testCasethe testCase
methodNamethe called method name
descriptionthe description of this test
filethe file of the test
lineNUmberthe line numbrer of the test

◆ ~TestResult()

virtual edbee::test::TestResult::~TestResult ( )
inlinevirtual

Member Function Documentation

◆ actualStatement()

virtual const char* edbee::test::TestResult::actualStatement ( )
inlinevirtual

◆ actualValue()

virtual QString edbee::test::TestResult::actualValue ( )
inlinevirtual

◆ compareStatement()

virtual bool edbee::test::TestResult::compareStatement ( )
inlinevirtual

◆ description()

virtual QString edbee::test::TestResult::description ( )
inlinevirtual

◆ expectedStatement()

virtual const char* edbee::test::TestResult::expectedStatement ( )
inlinevirtual

◆ expectedValue()

virtual QString edbee::test::TestResult::expectedValue ( )
inlinevirtual

◆ fileName()

virtual const char* edbee::test::TestResult::fileName ( )
inlinevirtual

◆ lineNumber()

virtual int edbee::test::TestResult::lineNumber ( )
inlinevirtual

◆ methodName()

virtual QString edbee::test::TestResult::methodName ( )
inlinevirtual

◆ setBooleanResult()

void edbee::test::TestResult::setBooleanResult ( bool  result,
const char *  statement 
)
virtual

Sets the result and the state of the test.

Parameters
resultthe result status
statementthe executed statement

◆ setCompareResult()

void edbee::test::TestResult::setCompareResult ( bool  result,
const QString &  actualValue,
const QString &  expectedValue,
const char *  actualStatement,
const char *  expectedStatement 
)
virtual

Sets a compare result.

Parameters
resultthe compare result
actualValuethe actual value set
expectedValuethe expected value of this operation
actualStatementthe executed statement
actualValuethe actual value of the compare

◆ setSkip()

void edbee::test::TestResult::setSkip ( )
virtual

A skip test result.

◆ statement()

virtual const char* edbee::test::TestResult::statement ( )
inlinevirtual

◆ status()

virtual Status edbee::test::TestResult::status ( )
inlinevirtual

◆ testCae()

virtual TestCase* edbee::test::TestResult::testCae ( )
inlinevirtual

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