14#include <source_location>
18#include <kaycxx/assert.hpp>
72 std::source_location const&
location() const noexcept;
79 std::optional<std::
string> const&
actual() const noexcept;
86 std::optional<std::
string> const&
expected() const noexcept;
90 std::
string description_;
93 std::
string error_message_;
96 std::source_location location_;
99 std::optional<std::
string> actual_;
102 std::optional<std::
string> expected_;
Failure result passed to reporters when a test case or suite fails.
Definition failure.hpp:25
std::string const & error_message() const noexcept
Returns the failure message.
failure(std::string_view description, std::source_location location)
Creates a failure for a non-standard unknown exception.
failure(std::string_view description, std::exception const &error, std::source_location location)
Creates a failure from a standard exception and explicit source location.
std::string const & description() const noexcept
Returns the full test or suite description.
std::optional< std::string > const & expected() const noexcept
Returns the expected assertion value when available.
std::source_location const & location() const noexcept
Returns the source location.
failure(std::string_view description, kaycxx::assert::assertion_error const &error, std::source_location location)
Creates a failure from an assertion error.
std::optional< std::string > const & actual() const noexcept
Returns the actual assertion value when available.
Unit test framework functions and types.
Definition test.hpp:15