Sequoia
Loading...
Searching...
No Matches
SemanticsTestDiagnosticsUtilities.hpp
Go to the documentation of this file.
1
2// Copyright Oliver J. Rosten 2024. //
3// Distributed under the GNU GENERAL PUBLIC LICENSE, Version 3.0. //
4// (See accompanying file LICENSE.md or copy at //
5// https://www.gnu.org/licenses/gpl-3.0.en.html) //
7
8#pragma once
9
13
14#include <vector>
15
16namespace sequoia::testing
17{
18 template<class T>
20 {
21 using type = T;
22 using equivalent_type = std::vector<typename T::value_type, typename T::allocator_type>;
23
24 template<test_mode Mode, class Advisor>
25 static void test(equivalence_check_t, test_logger<Mode>& logger, const type& obtained, const equivalent_type& prediction, const tutor<Advisor>& advisor)
26 {
27 check(equality, "Wrapped vector", logger, obtained.x, prediction, advisor);
28 }
29 };
30
31 enum class enable_serialization : bool {no, yes};
32}
Free functions for performing checks, together with the 'checker' class template which wraps them.
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
Definition: TestLogger.hpp:183
class template used to wrap function objects which proffer advice.
Definition: Advice.hpp:127
Definition: SemanticsTestDiagnosticsUtilities.hpp:20
Definition: FreeCheckers.hpp:87