Compute Library
 22.11
TestResult Struct Reference

Class to store results of a test. More...

#include <TestResult.h>

Public Types

enum  Status {
  NOT_RUN, SUCCESS, EXPECTED_FAILURE, FAILED,
  CRASHED, DISABLED
}
 Execution status of a test. More...
 

Public Member Functions

 TestResult ()=default
 Default constructor. More...
 
 TestResult (Status status)
 Initialise the result with a status. More...
 
 TestResult (Status status, const Profiler::MeasurementsMap &measurements)
 Initialise the result with a status and profiling information. More...
 

Data Fields

Status status { Status::NOT_RUN }
 Execution status. More...
 
Profiler::MeasurementsMap measurements {}
 Profiling information. More...
 
std::string header_data {}
 Test header data. More...
 

Detailed Description

Class to store results of a test.

Currently the execution status and profiling information are stored.

Definition at line 39 of file TestResult.h.

Member Enumeration Documentation

◆ Status

enum Status
strong

Execution status of a test.

Enumerator
NOT_RUN 
SUCCESS 
EXPECTED_FAILURE 
FAILED 
CRASHED 
DISABLED 

Definition at line 42 of file TestResult.h.

43  {
44  NOT_RUN,
45  SUCCESS,
46  EXPECTED_FAILURE,
47  FAILED,
48  CRASHED,
49  DISABLED
50  };

Constructor & Destructor Documentation

◆ TestResult() [1/3]

TestResult ( )
default

Default constructor.

◆ TestResult() [2/3]

TestResult ( Status  status)
inline

Initialise the result with a status.

Parameters
[in]statusExecution status.

Definition at line 59 of file TestResult.h.

60  : status{ status }
61  {
62  }
Status status
Execution status.
Definition: TestResult.h:74

◆ TestResult() [3/3]

TestResult ( Status  status,
const Profiler::MeasurementsMap measurements 
)
inline

Initialise the result with a status and profiling information.

Parameters
[in]statusExecution status.
[in]measurementsProfiling information.

Definition at line 69 of file TestResult.h.

References TestResult::measurements.

71  {
72  }
Profiler::MeasurementsMap measurements
Profiling information.
Definition: TestResult.h:75
Status status
Execution status.
Definition: TestResult.h:74

Field Documentation

◆ header_data

std::string header_data {}

Test header data.

Definition at line 76 of file TestResult.h.

Referenced by Framework::error_on_missing_assets().

◆ measurements

Profiler::MeasurementsMap measurements {}

Profiling information.

Definition at line 75 of file TestResult.h.

Referenced by Framework::error_on_missing_assets(), and TestResult::TestResult().

◆ status

Status status { Status::NOT_RUN }

Execution status.

Definition at line 74 of file TestResult.h.

Referenced by Framework::error_on_missing_assets(), and Framework::log_failed_expectation().


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