morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::testing::detail::Checks Class Reference

Collects a case's checks and keeps the first failure, so a case reads top to bottom. More...

#include <backend_conformance.hpp>

Public Member Functions

void text (std::string_view what, std::string_view expected, std::string_view actual)
 Checks that a text is what it should be.
void that (bool holds, std::string_view what)
 Checks a condition.
std::optional< std::string > result () const
 The case's verdict.

Detailed Description

Collects a case's checks and keeps the first failure, so a case reads top to bottom.

Definition at line 193 of file backend_conformance.hpp.

Member Function Documentation

◆ text()

void morph::ui::testing::detail::Checks::text ( std::string_view what,
std::string_view expected,
std::string_view actual )
inline

Checks that a text is what it should be.

Parameters
whatWhat is checked, for the message.
expectedThe text it should be.
actualThe text it is.

Definition at line 199 of file backend_conformance.hpp.

◆ that()

void morph::ui::testing::detail::Checks::that ( bool holds,
std::string_view what )
inline

Checks a condition.

Parameters
holdsThe condition.
whatThe failure message when it does not hold.

Definition at line 208 of file backend_conformance.hpp.

◆ result()

std::optional< std::string > morph::ui::testing::detail::Checks::result ( ) const
inlinenodiscard

The case's verdict.

Returns
nullopt when every check held, else the first failure.

Definition at line 216 of file backend_conformance.hpp.


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