8namespace CppSpec::Formatters {
10class Verbose :
public BaseFormatter {
15 explicit Verbose(std::ostream& out_stream) : BaseFormatter(out_stream) {}
16 Verbose(
const BaseFormatter& base, std::ostream& out_stream) : BaseFormatter(base, out_stream) {}
17 explicit Verbose(
const BaseFormatter& base) : BaseFormatter(base) {}
19 void format(
const Description& description)
override;
20 void format(
const ItBase& it)
override;
23inline void Verbose::format(
const Description& description) {
25 out_stream << std::endl;
27 out_stream << description.
padding() << description.get_description() << description.get_subject_type() << std::endl;
33inline void Verbose::format(
const ItBase& it) {
34 out_stream << status_color(it.get_result().status());
35 out_stream << it.padding() << it.get_description() << std::endl;
36 out_stream << reset_color();
41 for (
const Result& result : it.get_results()) {
42 if (result.is_failure()) {
43 out_stream << set_color(RED);
44 out_stream << result.get_message() << std::endl;
45 out_stream << reset_color();
49 get_and_increment_test_counter();
Definition description.hpp:20
Base class for it expressions.
Definition it_base.hpp:32
std::string padding() const noexcept
Generate padding (indentation) fore the current object.
Definition runnable.hpp:154
bool has_parent() noexcept
Check to see if the Runnable has a parent.
Definition runnable.hpp:56