Sequoia
Loading...
Searching...
No Matches
NormalPathTestingUtilities.hpp
Go to the documentation of this file.
1
2// Copyright Oliver J. Rosten 2025. //
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
14
15namespace sequoia::testing
16{
17 template<> struct value_tester<normal_path>
18 {
19 using type = normal_path;
20
21 template<test_mode Mode>
22 static void test(equality_check_t, test_logger<Mode>& logger, const type& actual, const type& prediction)
23 {
24 check(equality, "Wrapped Path", logger, actual.path(), prediction.path());
25 }
26
27 template<test_mode Mode>
28 static void test(equivalence_check_t, test_logger<Mode>& logger, const type& actual, const std::filesystem::path& prediction)
29 {
30 check(equality, "Wrapped Path", logger, actual.path(), prediction);
31 check(equality, "Conversion to Path", logger, static_cast<std::filesystem::path>(actual), prediction);
32 }
33 };
34}
Extensions to the std::filesystem library.
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.
Definition: FileSystem.hpp:20
Definition: TestLogger.hpp:183
Definition: FreeCheckers.hpp:82
Definition: FreeCheckers.hpp:87
class template, specializations of which implement various comparisons for the specified type.
Definition: FreeCheckers.hpp:78