Sequoia
|
Exposes elementary check methods, with the option to plug in arbitrary Extenders to compose functionality. More...
#include <FreeCheckers.hpp>
Public Types | |
using | logger_type = test_logger< Mode > |
Public Member Functions | |
checker (const checker &)=delete | |
checker & | operator= (const checker &)=delete |
template<class T , class Advisor = null_advisor, class Self > requires supports_equality_check<Mode, T, Advisor> | |
bool | check (this Self &self, equality_check_t, const reporter &description, const T &obtained, const T &prediction, tutor< Advisor > advisor={}) |
template<class T , class Advisor = null_advisor, class Self > requires supports_simple_equality_check<Mode, T, Advisor> | |
bool | check (this Self &self, simple_equality_check_t, const reporter &description, const T &obtained, const T &prediction, tutor< Advisor > advisor={}) |
template<class T , class U , minimal_reporting_permitted MinimalReporting, class Advisor = null_advisor, class Self > requires supports_best_available_check<MinimalReporting, Mode, T, U, Advisor> | |
bool | check (this Self &self, with_best_available_check_t< MinimalReporting >, const reporter &description, const T &obtained, const U &prediction, tutor< Advisor > advisor={}) |
template<class ValueBasedCustomizer , class T , class U , class Advisor = null_advisor, class Self > requires supports_generalized_equivalence_check<general_equivalence_check_t<ValueBasedCustomizer>, Mode, T, U, Advisor> | |
bool | check (this Self &self, general_equivalence_check_t< ValueBasedCustomizer > checker, const reporter &description, const T &obtained, const U &prediction, tutor< Advisor > advisor={}) |
template<class ValueBasedCustomizer , class T , class U , class Advisor = null_advisor, class Self > requires supports_generalized_equivalence_check<general_weak_equivalence_check_t<ValueBasedCustomizer>, Mode, T, U, Advisor> | |
bool | check (this Self &self, general_weak_equivalence_check_t< ValueBasedCustomizer > checker, const reporter &description, const T &obtained, const U &prediction, tutor< Advisor > advisor={}) |
template<class Compare , class T , class Advisor = null_advisor, class Self > requires potential_comparator_for<Compare, T> | |
bool | check (this Self &self, Compare compare, const reporter &description, const T &obtained, const T &prediction, tutor< Advisor > advisor={}) |
template<class Advisor = null_advisor, class Self > | |
bool | check (this Self &self, const reporter &description, const bool obtained, tutor< Advisor > advisor={}) |
template<class Compare , std::input_or_output_iterator Iter, std::sentinel_for< Iter > Sentinel, std::input_or_output_iterator PredictionIter, std::sentinel_for< PredictionIter > PredictionSentinel, class Advisor = null_advisor, class Self > requires supports_iterator_range_check<Compare, Mode, Iter, PredictionIter, Advisor> | |
bool | check (this Self &self, Compare compare, const reporter &description, Iter first, Sentinel last, PredictionIter predictionFirst, PredictionSentinel predictionLast, tutor< Advisor > advisor={}) |
template<class E , class Fn , invocable_r< std::string, project_paths, std::string > Postprocessor = default_exception_message_postprocessor, class Self > | |
bool | check_exception_thrown (this Self &self, const reporter &description, Fn &&function, Postprocessor postprocessor={}) |
log_summary | summary (std::string_view prefix, const log_summary::duration delta) const |
void | reset_results () noexcept |
bool | has_critical_failures () const noexcept |
Static Public Attributes | |
static constexpr test_mode | mode {Mode} |
Protected Member Functions | |
checker (active_recovery_files recovery) | |
checker (checker &&) noexcept=default | |
checker & | operator= (checker &&) noexcept=default |
std::size_t | checks () const noexcept |
std::size_t | failures () const noexcept |
const uncaught_exception_info & | exceptions_detected_by_sentinel () const noexcept |
sentinel< Mode > | make_sentinel (std::string message) |
std::string_view | top_level_message () const |
const failure_output & | failure_messages () const noexcept |
Friends | |
template<class Stream > requires serializable_to<Stream, test_logger<Mode>> | |
Stream & | operator<< (Stream &os, const checker &c) |
Exposes elementary check methods, with the option to plug in arbitrary Extenders to compose functionality.
This class template is templated on the enum class test_mode, with an Extender which will become variadic as soon as variadic friends are available.
In its unextended form, the class is appropriate for plugging into basic_test to generate a base class appropriate for testing free functions. Within the unit test framework various Extenders are defined. For example, there are extensions to test types with regular semantics, types with move-only semantics, to do performance tests, and more, besides. The template design allows extenders to be conveniently mixed and matched via using declarations.