FreeNOS
|
Represents a Test result created by a TestInstance. More...
#include <TestResult.h>
Public Types | |
enum | Result { Success, Failure, Skipped } |
Result codes. More... | |
Public Member Functions | |
TestResult (Result result, const char *description="") | |
Constructor. More... | |
bool | isOK () const |
Check if the test passed. More... | |
bool | isFailed () const |
Check if the test failed. More... | |
bool | isSkipped () const |
Check if the test is skipped. More... | |
const Result | getResult () const |
Get result code. More... | |
String & | getDescription () |
Get result description. More... | |
Private Attributes | |
const Result | m_result |
The result code for this test. More... | |
String | m_description |
Text describing the result. More... | |
Represents a Test result created by a TestInstance.
Definition at line 47 of file TestResult.h.
enum TestResult::Result |
TestResult::TestResult | ( | Result | result, |
const char * | description = "" |
||
) |
Constructor.
Definition at line 20 of file TestResult.cpp.
String & TestResult::getDescription | ( | ) |
Get result description.
Definition at line 45 of file TestResult.cpp.
References m_description.
Referenced by StdoutReporter::reportAfter(), TAPReporter::reportAfter(), and XMLReporter::reportAfter().
const TestResult::Result TestResult::getResult | ( | ) | const |
Get result code.
Definition at line 40 of file TestResult.cpp.
References m_result.
Referenced by StdoutReporter::reportAfter(), TAPReporter::reportAfter(), and XMLReporter::reportAfter().
bool TestResult::isFailed | ( | ) | const |
Check if the test failed.
Definition at line 30 of file TestResult.cpp.
References Failure, and m_result.
Referenced by TestReporter::collect().
bool TestResult::isOK | ( | ) | const |
Check if the test passed.
Definition at line 25 of file TestResult.cpp.
References m_result, and Success.
Referenced by TestReporter::collect().
bool TestResult::isSkipped | ( | ) | const |
Check if the test is skipped.
Definition at line 35 of file TestResult.cpp.
References m_result, and Skipped.
Referenced by TestReporter::collect().
|
private |
Text describing the result.
Definition at line 99 of file TestResult.h.
Referenced by getDescription().
|
private |
The result code for this test.
Definition at line 96 of file TestResult.h.
Referenced by getResult(), isFailed(), isOK(), and isSkipped().