Sequoia
Loading...
Searching...
No Matches
Classes | Concepts | Typedefs | Functions | Variables
Output.hpp File Reference

A collection of functions for formatting test output. More...

#include "sequoia/TestFramework/CoreInfrastructure.hpp"
#include "sequoia/TextProcessing/Indent.hpp"
#include "sequoia/PlatformSpecific/Preprocessor.hpp"
#include <cmath>
#include <filesystem>
#include <source_location>

Go to the source code of this file.

Classes

class  sequoia::testing::line_breaks
 
struct  sequoia::testing::final_message_constant< IsFinalMessage >
 
struct  sequoia::testing::no_source_location_t
 
class  sequoia::testing::reporter
 
struct  sequoia::testing::type_demangler< T >
 Specialize this struct template to customize the way in which type info is generated for a given class. This is particularly useful for class templates where standard de-mangling may be hard to read! More...
 
struct  sequoia::testing::type_list_demangler< T, U >
 Demangles T; if U... is not empty, appends each demangled element of U on a new line. More...
 

Concepts

concept  sequoia::testing::reportable
 

Typedefs

using sequoia::testing::is_final_message_t = final_message_constant< true >
 
using sequoia::testing::is_not_final_message_t = final_message_constant< false >
 

Functions

consteval line_breaks sequoia::testing::operator""_linebreaks (unsigned long long int n) noexcept
 
std::string sequoia::testing::emphasise (std::string_view s)
 
template<class Char >
requires is_character_v<Char>
std::string sequoia::testing::display_character (Char c)
 
void sequoia::testing::end_block (std::string &s, const line_breaks newlines, std::string_view footer)
 
std::string sequoia::testing::end_block (std::string_view s, const line_breaks newlines, std::string_view footer)
 
std::string sequoia::testing::exception_message (std::string_view tag, const std::filesystem::path &filename, const uncaught_exception_info &info, std::string_view exceptionMessage)
 
std::string sequoia::testing::operator_message (std::string_view op, std::string_view opRetVal)
 
std::string sequoia::testing::nullable_type_message (const bool obtainedHoldsValue, const bool predictedHoldsValue)
 
std::string sequoia::testing::equality_operator_failure_message ()
 
std::string sequoia::testing::pointer_prediction_message ()
 
std::string sequoia::testing::default_prediction_message (std::string_view obtained, std::string_view prediction)
 
std::string sequoia::testing::prediction_message (const std::string &obtained, const std::string &prediction)
 
template<class Char >
requires is_character_v<Char>
std::string sequoia::testing::prediction_message (Char obtained, Char prediction)
 
template<class Ptr >
requires std::is_pointer_v<Ptr> || is_const_pointer_v<Ptr>
std::string sequoia::testing::prediction_message (Ptr obtained, Ptr prediction)
 
template<serializable T>
requires (!is_character_v<T> && !std::is_pointer_v<T> && !is_const_pointer_v<T>)
std::string sequoia::testing::prediction_message (const T &obtained, const T &prediction)
 
template<reportable T>
requires std::is_same_v<T, bool>
std::string sequoia::testing::failure_message (is_final_message_t, T, T)
 To prevent implicit conversions to bool.
 
template<reportable T>
requires (!std::is_same_v<T, bool>)
std::string sequoia::testing::failure_message (is_final_message_t, const T &obtained, const T &prediction)
 
template<class T >
std::string sequoia::testing::failure_message (is_not_final_message_t, const T &, const T &)
 
std::string sequoia::testing::footer ()
 
std::string sequoia::testing::instability_footer ()
 
std::string sequoia::testing::report_line (std::string_view message, const std::filesystem::path &repository, const std::source_location loc)
 
std::filesystem::path sequoia::testing::path_for_reporting (const std::filesystem::path &file, const std::filesystem::path &repository)
 
std::string sequoia::testing::tidy_name (std::string name, clang_type)
 
std::string sequoia::testing::tidy_name (std::string name, gcc_type)
 
std::string sequoia::testing::tidy_name (std::string name, msvc_type)
 
std::string sequoia::testing::tidy_name (std::string name, other_compiler_type)
 
std::string sequoia::testing::demangle (std::string mangled)
 
template<class T , invocable_r< std::string, std::string > Tidy>
std::string sequoia::testing::demangle (Tidy tidy)
 
template<class T >
std::string sequoia::testing::demangle ()
 
template<class T , class... U>
std::string sequoia::testing::make_type_info ()
 
template<class T , class... U>
std::string sequoia::testing::add_type_info (std::string description)
 

Variables

template<class Char >
constexpr bool sequoia::testing::is_character_v
 
constexpr is_final_message_t sequoia::testing::is_final_message {}
 
constexpr is_not_final_message_t sequoia::testing::is_not_final_message {}
 
constexpr no_source_location_t sequoia::testing::no_source_location {}
 

Detailed Description

A collection of functions for formatting test output.

Variable Documentation

◆ is_character_v

template<class Char >
constexpr bool sequoia::testing::is_character_v
inlineconstexpr
Initial value:
{
std::is_same_v<std::remove_cvref_t<Char>, char>
|| std::is_same_v<std::remove_cvref_t<Char>, wchar_t>
|| std::is_same_v<std::remove_cvref_t<Char>, char8_t>
|| std::is_same_v<std::remove_cvref_t<Char>, char16_t>
|| std::is_same_v<std::remove_cvref_t<Char>, char32_t>
}