mimic++ v9.2.1
Loading...
Searching...
No Matches
ExpectationReport.hpp
Go to the documentation of this file.
1// Copyright Dominic (DNKpp) Koepke 2024 - 2025.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// https://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef MIMICPP_REPORTING_EXPECTATION_REPORT_HPP
7#define MIMICPP_REPORTING_EXPECTATION_REPORT_HPP
8
9#pragma once
10
11#include "mimic++/Fwd.hpp"
16
17#ifndef MIMICPP_DETAIL_IS_MODULE
18 #include <optional>
19 #include <variant>
20 #include <vector>
21#endif
22
24{
30 {
31 int min{};
32 int max{};
33 int count{};
34 std::vector<sequence::rating> sequences{};
35 std::vector<SequenceReport> inapplicableSequences{};
36
37 [[nodiscard]]
38 friend bool operator==(state_inapplicable const&, state_inapplicable const&) = default;
39 };
40
46 {
47 int min{};
48 int max{};
49 int count{};
50 std::vector<sequence::rating> sequenceRatings{};
51
52 [[nodiscard]]
53 friend bool operator==(state_applicable const&, state_applicable const&) = default;
54 };
55
61 {
62 int min{};
63 int max{};
64 int count{};
65 std::vector<SequenceReport> sequences{};
66
67 [[nodiscard]]
68 friend bool operator==(state_saturated const&, state_saturated const&) = default;
69 };
70
75 using control_state_t = std::variant<
79
85 {
86 public:
90 std::optional<StringT> finalizerDescription{};
91 std::vector<std::optional<StringT>> requirementDescriptions{};
92
93 [[nodiscard]]
94 friend bool operator==(ExpectationReport const&, ExpectationReport const&) = default;
95 };
96
102 {
103 public:
104 std::vector<bool> outcomes{};
105
106 [[nodiscard]]
107 friend bool operator==(RequirementOutcomes const&, RequirementOutcomes const&) = default;
108 };
109}
110
111#endif
#define MIMICPP_DETAIL_MODULE_EXPORT
Definition Config.hpp:19
Contains the extracted info from a typed expectation.
Definition ExpectationReport.hpp:85
util::SourceLocation from
Definition ExpectationReport.hpp:87
std::vector< std::optional< StringT > > requirementDescriptions
Definition ExpectationReport.hpp:91
friend bool operator==(ExpectationReport const &, ExpectationReport const &)=default
std::optional< StringT > finalizerDescription
Definition ExpectationReport.hpp:90
TargetReport target
Definition ExpectationReport.hpp:88
control_state_t controlReport
Definition ExpectationReport.hpp:89
Contains the boolean outcomes of a match-test.
Definition ExpectationReport.hpp:102
friend bool operator==(RequirementOutcomes const &, RequirementOutcomes const &)=default
std::vector< bool > outcomes
Definition ExpectationReport.hpp:104
Contains the extracted mock info.
Definition TargetReport.hpp:22
A thin wrapper around general source-location info.
Definition SourceLocation.hpp:38
std::variant< state_inapplicable, state_applicable, state_saturated > control_state_t
Denotes an expectation state.
Definition ExpectationReport.hpp:75
Definition BasicReporter.hpp:27
Denotes an applicable expectation state.
Definition ExpectationReport.hpp:46
int max
Definition ExpectationReport.hpp:48
int min
Definition ExpectationReport.hpp:47
friend bool operator==(state_applicable const &, state_applicable const &)=default
int count
Definition ExpectationReport.hpp:49
std::vector< sequence::rating > sequenceRatings
Definition ExpectationReport.hpp:50
Denotes an inapplicable expectation state.
Definition ExpectationReport.hpp:30
int count
Definition ExpectationReport.hpp:33
std::vector< sequence::rating > sequences
Definition ExpectationReport.hpp:34
int max
Definition ExpectationReport.hpp:32
int min
Definition ExpectationReport.hpp:31
friend bool operator==(state_inapplicable const &, state_inapplicable const &)=default
std::vector< SequenceReport > inapplicableSequences
Definition ExpectationReport.hpp:35
Denotes a saturated expectation state.
Definition ExpectationReport.hpp:61
int max
Definition ExpectationReport.hpp:63
std::vector< SequenceReport > sequences
Definition ExpectationReport.hpp:65
friend bool operator==(state_saturated const &, state_saturated const &)=default
int min
Definition ExpectationReport.hpp:62
int count
Definition ExpectationReport.hpp:64