Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_tostring.h File Reference
#include <vector>
#include <cstddef>
#include <type_traits>
#include <string>
#include "catch_compiler_capabilities.h"
#include "catch_stream.h"
#include "catch_interfaces_enum_values_registry.h"
Include dependency graph for catch_tostring.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Catch::Detail::IsStreamInsertable< T >
 
struct  Catch::StringMaker< T, typename >
 
struct  Catch::StringMaker< std::string >
 
struct  Catch::StringMaker< char const * >
 
struct  Catch::StringMaker< char * >
 
struct  Catch::StringMaker< std::wstring >
 
struct  Catch::StringMaker< wchar_t const * >
 
struct  Catch::StringMaker< wchar_t * >
 
struct  Catch::StringMaker< char[SZ]>
 
struct  Catch::StringMaker< signed char[SZ]>
 
struct  Catch::StringMaker< unsigned char[SZ]>
 
struct  Catch::StringMaker< int >
 
struct  Catch::StringMaker< long >
 
struct  Catch::StringMaker< long long >
 
struct  Catch::StringMaker< unsigned int >
 
struct  Catch::StringMaker< unsigned long >
 
struct  Catch::StringMaker< unsigned long long >
 
struct  Catch::StringMaker< bool >
 
struct  Catch::StringMaker< char >
 
struct  Catch::StringMaker< signed char >
 
struct  Catch::StringMaker< unsigned char >
 
struct  Catch::StringMaker< std::nullptr_t >
 
struct  Catch::StringMaker< float >
 
struct  Catch::StringMaker< double >
 
struct  Catch::StringMaker< T * >
 
struct  Catch::StringMaker< R C::* >
 
struct  Catch::not_this_one
 
struct  Catch::is_range< T >
 
struct  Catch::StringMaker< R, typename std::enable_if< is_range< R >::value &&!::Catch::Detail::IsStreamInsertable< R >::value >::type >
 
struct  Catch::StringMaker< T[SZ]>
 

Namespaces

namespace  Catch
 
namespace  Catch::Detail
 

Macros

#define INTERNAL_CATCH_REGISTER_ENUM(enumName, ...)
 
#define CATCH_REGISTER_ENUM(enumName, ...)
 

Functions

std::string Catch::Detail::rawMemoryToString (const void *object, std::size_t size)
 
template<typename T >
std::string Catch::Detail::rawMemoryToString (const T &object)
 
template<typename E >
std::string Catch::Detail::convertUnknownEnumToString (E e)
 
template<typename T >
std::enable_if<!std::is_enum< T >::value &&!std::is_base_of< std::exception, T >::value, std::string >::type Catch::Detail::convertUnstreamable (T const &)
 
template<typename T >
std::enable_if<!std::is_enum< T >::value &&std::is_base_of< std::exception, T >::value, std::string >::type Catch::Detail::convertUnstreamable (T const &ex)
 
template<typename T >
std::enable_if< std::is_enum< T >::value, std::string >::type Catch::Detail::convertUnstreamable (T const &value)
 
template<typename T >
std::string Catch::Detail::stringify (const T &e)
 
template<typename InputIterator >
std::string Catch::Detail::rangeToString (InputIterator first, InputIterator last)
 
template<typename Range >
std::string Catch::rangeToString (Range const &range)
 
template<typename Allocator >
std::string Catch::rangeToString (std::vector< bool, Allocator > const &v)
 

Variables

not_this_one Catch::begin (...)
 
not_this_one Catch::end (...)
 

Macro Definition Documentation

◆ CATCH_REGISTER_ENUM

#define CATCH_REGISTER_ENUM ( enumName,
... )
Value:
INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ )
#define INTERNAL_CATCH_REGISTER_ENUM(enumName,...)

Definition at line 653 of file catch_tostring.h.

◆ INTERNAL_CATCH_REGISTER_ENUM

#define INTERNAL_CATCH_REGISTER_ENUM ( enumName,
... )
Value:
namespace Catch { \
template<> struct StringMaker<enumName> { \
static std::string convert( enumName value ) { \
static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \
return enumInfo.lookup( static_cast<int>( value ) ); \
} \
}; \
}
IMutableRegistryHub & getMutableRegistryHub()
#define value
Definition pkcs11.h:157
StringRef lookup(int value) const
virtual Detail::EnumInfo const & registerEnum(StringRef enumName, StringRef allEnums, std::vector< int > const &values)=0
virtual IMutableEnumValuesRegistry & getMutableEnumValuesRegistry()=0
static std::enable_if<::Catch::Detail::IsStreamInsertable< Fake >::value, std::string >::type convert(const Fake &value)

Definition at line 643 of file catch_tostring.h.

643#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \
644namespace Catch { \
645 template<> struct StringMaker<enumName> { \
646 static std::string convert( enumName value ) { \
647 static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \
648 return enumInfo.lookup( static_cast<int>( value ) ); \
649 } \
650 }; \
651}