17namespace sequoia::testing
19 template<
class... Products>
23 using element = std::pair<std::string, std::variant<Products...>>;
25 template<
class... Args>
28 template<test_mode Mode,
class... Args>
32 for(
const auto&[name, product] : prediction)
34 const auto message{std::string{
"Product generated by name '"}.append(name).append(
"'")};
36 [&actual, &name](
const Args&... args){
37 return actual.make(name, args...);
40 check(equality, message, logger, std::apply(maker, equivChecker.customizer), product);
44 template<test_mode Mode>
47 for(
const auto&[name, product] : prediction)
49 const auto message{std::string{
"Product generated by name '"}.append(name).append(
"'")};
50 check(equality, message, logger, actual.make(name), product);
55 template<test_mode Mode>
58 check(equality,
"Names", logger, actual.begin_names(), actual.end_names(), prediction.begin_names(), prediction.end_names());
Factory implementation(s)
bool check(CheckType flavour, std::string description, test_logger< Mode > &logger, Iter first, Sentinel last, PredictionIter predictionFirst, PredictionSentinel predictionLast, tutor< Advisor > advisor={})
The workhorse for comparing the contents of ranges.
Definition: FreeCheckers.hpp:377
Utilities for checking regular semantics.
Generic factory with statically defined products.
Definition: Factory.hpp:68
Definition: TestLogger.hpp:183
A concept similar to std::constructible_from, but which considers braced-init.
Definition: Concepts.hpp:75
Definition: FreeCheckers.hpp:82
Definition: FreeCheckers.hpp:87
class template, specializations of which implement various comparisons for the specified type.
Definition: FreeCheckers.hpp:78