System::TestPredicates::Details Namespace Reference

Namespaces

 SharedPtrAsserts
 

Functions

template<typename T >
std::enable_if_t<!TypeTraits::IsEnumerable< T >::value, std::string > PrintToString (const T &)
 
template<typename T >
std::enable_if_t< TypeTraits::IsEnumerable< T >::value, std::string > PrintToString (const T &value)
 
std::string PrintToString (std::nullptr_t)
 
std::string PrintToString (const Collections::Generic::IEnumerable< bool > &)
 
template<typename T >
std::enable_if< System::Details::HasToString< T >::value, std::string >::type PrintToStringImpl (const SharedPtr< T > &value, long long s)
 
template<typename T >
std::enable_if< System::Details::HasToString< T >::value, std::string >::type PrintToStringImpl (const WeakPtr< T > &value, long long s)
 
template<typename T >
std::enable_if<!TypeTraits::has_print_to_method< T >::value &&System::Details::HasToString< T >::value, std::string >::type PrintToStringImpl (const T &value, long long s)
 
template<typename T >
std::enable_if< TypeTraits::has_print_to_method< T >::value &&!TypeTraits::IsEnumerable< T >::value, std::string >::type PrintToStringImpl (const T &value, long long s)
 
template<typename T >
std::enable_if< TypeTraits::has_print_to_method< T >::value &&TypeTraits::IsEnumerable< T >::value, std::string >::type PrintToStringImpl (const T &value, long long s)
 
template<typename T1 , typename T2 >
std::string PrintToStringImpl (const std::pair< T1, T2 > &value, long long s)
 
template<typename T1 , typename T2 >
std::string PrintToStringImpl (const Collections::Generic::KeyValuePair< T1, T2 > &value, long long s)
 
template<typename T >
std::enable_if< TypeTraits::IsCppContainer< T >::value &&!std::is_base_of< Object, T >::value, std::string >::type PrintToStringImpl (const T &container, long long s)
 
template<typename T >
std::string PrintToStringImpl (const T &value, int s)
 
template<typename T1 , typename T2 >
testing::AssertionResult EqFailure (const char *lhs_expr, const char *rhs_expr, T1 &lhs, T2 &rhs)
 
template<typename T1 , typename T2 >
testing::AssertionResult NotEqFailure (const char *lhs_expr, const char *rhs_expr, T1 &lhs, T2 &rhs)
 
template<typename T1 , typename T2 >
testing::AssertionResult SameFailure (const char *lhs_expr, const char *rhs_expr, T1 &lhs, T2 &rhs)
 
template<typename T1 , typename T2 >
testing::AssertionResult NotSameFailure (const char *lhs_expr, const char *rhs_expr, T1 &lhs, T2 &rhs)
 

Function Documentation

◆ EqFailure()

template<typename T1 , typename T2 >
testing::AssertionResult System::TestPredicates::Details::EqFailure ( const char *  lhs_expr,
const char *  rhs_expr,
T1 &  lhs,
T2 &  rhs 
)

Formats == assertion failure for output.

Template Parameters
T1LHS value type.
T2RHS value type.
Parameters
lhs_exprLHS expression.
rhs_exprRHS expression.
lhsLHS value.
rhsRHS value.
Returns
Object wrapping failure text.

◆ NotEqFailure()

template<typename T1 , typename T2 >
testing::AssertionResult System::TestPredicates::Details::NotEqFailure ( const char *  lhs_expr,
const char *  rhs_expr,
T1 &  lhs,
T2 &  rhs 
)

Formats != assertion failure for output.

Template Parameters
T1LHS value type.
T2RHS value type.
Parameters
lhs_exprLHS expression.
rhs_exprRHS expression.
lhsLHS value.
rhsRHS value.
Returns
Object wrapping failure text.

◆ NotSameFailure()

template<typename T1 , typename T2 >
testing::AssertionResult System::TestPredicates::Details::NotSameFailure ( const char *  lhs_expr,
const char *  rhs_expr,
T1 &  lhs,
T2 &  rhs 
)

Formats 'not same' assertion failure for output.

Template Parameters
T1LHS value type.
T2RHS value type.
Parameters
lhs_exprLHS expression.
rhs_exprRHS expression.
lhsLHS value.
rhsRHS value.
Returns
Object wrapping failure text.

◆ PrintToString() [1/4]

template<typename T >
std::enable_if_t<!TypeTraits::IsEnumerable< T >::value, std::string > System::TestPredicates::Details::PrintToString ( const T &  value)

Prints object to string by selecting proper serializer function.

Template Parameters
TObject type.
Parameters
valueObject to print.
Returns
String representations of object passed.

◆ PrintToString() [2/4]

template<typename T >
std::enable_if_t< TypeTraits::IsEnumerable< T >::value, std::string > System::TestPredicates::Details::PrintToString ( const T &  value)

Prints ICollection-style containers to string by printing their elements (not more than 32).

Template Parameters
TObject type.
Parameters
valueObject to print.
Returns
Joint string representations of contained elements.

◆ PrintToString() [3/4]

std::string System::TestPredicates::Details::PrintToString ( std::nullptr_t  )
inline

Prints nullptr to string.

Returns
"nullptr" string.

◆ PrintToString() [4/4]

std::string System::TestPredicates::Details::PrintToString ( const Collections::Generic::IEnumerable< bool > &  value)
inline

Prints IEnumerable<bool> collections to string by printing their elements (not more than 32).

Template Parameters
TObject type.
Parameters
valueObject to print.
Returns
Joint string representations of contained elements.

◆ PrintToStringImpl() [1/9]

template<typename T >
std::enable_if<System::Details::HasToString<T>::value, std::string>::type System::TestPredicates::Details::PrintToStringImpl ( const SharedPtr< T > &  value,
long long  s 
)

Prints System::Object subclass to string using ToString() method.

Template Parameters
TFinal class type.
Parameters
valuePointer to object to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
String representation of object passed or "nullptr", if value is null.

◆ PrintToStringImpl() [2/9]

template<typename T >
std::enable_if<System::Details::HasToString<T>::value, std::string>::type System::TestPredicates::Details::PrintToStringImpl ( const WeakPtr< T > &  value,
long long  s 
)

Prints System::Object subclass to string using ToString() method.

Template Parameters
TFinal class type.
Parameters
valuePointer to object to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
String representation of object passed or "nullptr", if value is null.

◆ PrintToStringImpl() [3/9]

template<typename T >
std::enable_if<!TypeTraits::has_print_to_method<T>::value && System::Details::HasToString<T>::value, std::string>::type System::TestPredicates::Details::PrintToStringImpl ( const T &  value,
long long  s 
)

Prints object to string using ToString() method.

Template Parameters
TObject type.
Parameters
valueObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
String representation of object passed.

◆ PrintToStringImpl() [4/9]

template<typename T >
std::enable_if<TypeTraits::has_print_to_method<T>::value && !TypeTraits::IsEnumerable<T>::value, std::string>::type System::TestPredicates::Details::PrintToStringImpl ( const T &  value,
long long  s 
)

Prints object to string using PrintTo method.

Template Parameters
TObject type.
Parameters
valueObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
String representation of object passed.

◆ PrintToStringImpl() [5/9]

template<typename T >
std::enable_if<TypeTraits::has_print_to_method<T>::value && TypeTraits::IsEnumerable<T>::value, std::string>::type System::TestPredicates::Details::PrintToStringImpl ( const T &  value,
long long  s 
)

Prints object to string using PrintTo method.

Template Parameters
TObject type.
Parameters
valueObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
String representation of object passed.

◆ PrintToStringImpl() [6/9]

template<typename T1 , typename T2 >
std::string System::TestPredicates::Details::PrintToStringImpl ( const std::pair< T1, T2 > &  value,
long long  s 
)

Prints pair to string.

Template Parameters
T1First pair type argument.
T2Second pair type argument.
Parameters
valueObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
Joint string representations of both first and second pair components.

◆ PrintToStringImpl() [7/9]

template<typename T1 , typename T2 >
std::string System::TestPredicates::Details::PrintToStringImpl ( const Collections::Generic::KeyValuePair< T1, T2 > &  value,
long long  s 
)

Prints pair to string.

Template Parameters
T1First pair type argument.
T2Second pair type argument.
Parameters
valueObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
Joint string representations of both first and second pair components.

◆ PrintToStringImpl() [8/9]

template<typename T >
std::enable_if<TypeTraits::IsCppContainer<T>::value && !std::is_base_of<Object, T>::value, std::string>::type System::TestPredicates::Details::PrintToStringImpl ( const T &  container,
long long  s 
)

Prints STL-style containers to string by printing their elements (not more than 32).

Template Parameters
TObject type.
Parameters
containerObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
Joint string representations of contained elements.

◆ PrintToStringImpl() [9/9]

template<typename T >
std::string System::TestPredicates::Details::PrintToStringImpl ( const T &  value,
int  s 
)

Prints other types to string by using gtest-provided functions.

Template Parameters
TObject type.
Parameters
valueObject to print.
sA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored
Returns
String representations of object passed.

◆ SameFailure()

template<typename T1 , typename T2 >
testing::AssertionResult System::TestPredicates::Details::SameFailure ( const char *  lhs_expr,
const char *  rhs_expr,
T1 &  lhs,
T2 &  rhs 
)

Formats 'same' assertion failure for output.

Template Parameters
T1LHS value type.
T2RHS value type.
Parameters
lhs_exprLHS expression.
rhs_exprRHS expression.
lhsLHS value.
rhsRHS value.
Returns
Object wrapping failure text.