Sequoia
Loading...
Searching...
No Matches
TestRunnerDiagnosticsUtilities.hpp
Go to the documentation of this file.
1
2// Copyright Oliver J. Rosten 2020. //
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
15
16namespace sequoia::testing
17{
18 template<>
20 {
21 template<test_mode Mode>
22 static void test(equality_check_t, test_logger<Mode>& logger, const template_spec& obtained, const template_spec& prediction)
23 {
24 check(equality, "Species", logger, obtained.species, prediction.species);
25 check(equality, "Symbol", logger, obtained.symbol, prediction.symbol);
26 }
27 };
28
29 class bar_free_test final : public free_test
30 {
31 public:
32 using free_test::free_test;
33
34 [[nodiscard]]
35 std::filesystem::path source_file() const;
36
37 void run_tests()
38 {
39 check(equality, {"Phoney equality check"}, 1, 1);
40 throw std::runtime_error{"Throw after check"};
41 }
42 };
43}
Core declarations / definitions used in the testing framework.
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 creating new tests, especially from the commandline.
Utilities for running tests from the command line.
Definition: TestRunnerDiagnosticsUtilities.hpp:30
class template from which all concrete tests should derive.
Definition: FreeTestCore.hpp:144
Definition: TestLogger.hpp:183
Definition: FreeCheckers.hpp:82
Definition: TestCreator.hpp:29
class template, specializations of which implement various comparisons for the specified type.
Definition: FreeCheckers.hpp:78