CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::UnitTestRecord Struct Reference

Registration and result record for a single unit test. More...

#include <UnitTestFramework.h>

Collaboration diagram for cmlabs::UnitTestRecord:
[legend]

Public Member Functions

 UnitTestRecord ()
 Default: unregistered, not run, in the default suite.

Public Attributes

std::string name
 Canonical name, used by test=<name>.
std::string description
 One-line human description.
std::string category
 Grouping label (e.g.
UnitTestFunc func
 The test function itself.
bool inDefaultRun
 Included when running the whole suite (test=cmsdk).
bool ran
 True once the runner attempted this test.
bool passed
 Outcome (only meaningful when ran).
uint64 durationUs
 Wall-clock duration in microseconds.
std::string failReason
 Reason set by the test via unittest::fail() (printed immediately).
std::string endNote
 Framework outcome note (timed out / crashed / no test function).
std::vector< UnitTestMetricmetrics
 Metrics recorded via unittest::metric().

Detailed Description

Registration and result record for a single unit test.

Definition at line 148 of file UnitTestFramework.h.

Constructor & Destructor Documentation

◆ UnitTestRecord()

cmlabs::UnitTestRecord::UnitTestRecord ( )
inline

Default: unregistered, not run, in the default suite.

Definition at line 164 of file UnitTestFramework.h.

References durationUs, func, inDefaultRun, passed, and ran.

Member Data Documentation

◆ category

std::string cmlabs::UnitTestRecord::category

Grouping label (e.g.

"core")

Definition at line 151 of file UnitTestFramework.h.

Referenced by cmlabs::UnitTestRunner::registerTest().

◆ description

std::string cmlabs::UnitTestRecord::description

One-line human description.

Definition at line 150 of file UnitTestFramework.h.

Referenced by cmlabs::UnitTestRunner::registerTest().

◆ durationUs

uint64 cmlabs::UnitTestRecord::durationUs

Wall-clock duration in microseconds.

Definition at line 158 of file UnitTestFramework.h.

Referenced by UnitTestRecord().

◆ endNote

std::string cmlabs::UnitTestRecord::endNote

Framework outcome note (timed out / crashed / no test function).

Definition at line 160 of file UnitTestFramework.h.

◆ failReason

std::string cmlabs::UnitTestRecord::failReason

Reason set by the test via unittest::fail() (printed immediately).

Definition at line 159 of file UnitTestFramework.h.

Referenced by cmlabs::ut_readChildResult(), and cmlabs::ut_writeChildResult().

◆ func

UnitTestFunc cmlabs::UnitTestRecord::func

The test function itself.

Definition at line 152 of file UnitTestFramework.h.

Referenced by cmlabs::UnitTestRunner::registerTest(), and UnitTestRecord().

◆ inDefaultRun

bool cmlabs::UnitTestRecord::inDefaultRun

Included when running the whole suite (test=cmsdk).

Definition at line 153 of file UnitTestFramework.h.

Referenced by cmlabs::UnitTestRunner::registerTest(), and UnitTestRecord().

◆ metrics

std::vector<UnitTestMetric> cmlabs::UnitTestRecord::metrics

Metrics recorded via unittest::metric().

Definition at line 161 of file UnitTestFramework.h.

Referenced by cmlabs::ut_readChildResult(), and cmlabs::ut_writeChildResult().

◆ name

std::string cmlabs::UnitTestRecord::name

Canonical name, used by test=<name>.

Definition at line 149 of file UnitTestFramework.h.

Referenced by cmlabs::UnitTestRunner::registerTest(), and cmlabs::UnitTestRunner::runOne().

◆ passed

bool cmlabs::UnitTestRecord::passed

Outcome (only meaningful when ran).

Definition at line 157 of file UnitTestFramework.h.

Referenced by UnitTestRecord().

◆ ran

bool cmlabs::UnitTestRecord::ran

True once the runner attempted this test.

Definition at line 156 of file UnitTestFramework.h.

Referenced by UnitTestRecord().


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