PrintToStringImpl()

System::TestPredicates::Details::PrintToStringImpl(const SharedPtr<T>&, long long) function

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

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)

Template parameters

ParameterDescription
TFinal class type.

Arguments

ParameterTypeDescription
valueconst SharedPtr<T>&Pointer to object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

String representation of object passed or "nullptr", if value is null.

System::TestPredicates::Details::PrintToStringImpl(const WeakPtr<T>&, long long) function

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

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)

Template parameters

ParameterDescription
TFinal class type.

Arguments

ParameterTypeDescription
valueconst WeakPtr<T>&Pointer to object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

String representation of object passed or "nullptr", if value is null.

System::TestPredicates::Details::PrintToStringImpl(const T&, long long) function

Prints object to string using ToString() method.

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)

Template parameters

ParameterDescription
TObject type.

Arguments

ParameterTypeDescription
valueconst T&Object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

String representation of object passed.

System::TestPredicates::Details::PrintToStringImpl(const T&, long long) function

Prints object to string using PrintTo method.

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)

Template parameters

ParameterDescription
TObject type.

Arguments

ParameterTypeDescription
valueconst T&Object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

String representation of object passed.

System::TestPredicates::Details::PrintToStringImpl(const T&, long long) function

Prints object to string using PrintTo method.

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)

Template parameters

ParameterDescription
TObject type.

Arguments

ParameterTypeDescription
valueconst T&Object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

String representation of object passed.

System::TestPredicates::Details::PrintToStringImpl(const std::pair<T1, T2>&, long long) function

Prints pair to string.

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

Template parameters

ParameterDescription
T1First pair type argument.
T2Second pair type argument.

Arguments

ParameterTypeDescription
valueconst std::pair<T1, T2>&Object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

Joint string representations of both first and second pair components.

System::TestPredicates::Details::PrintToStringImpl(const Collections::Generic::KeyValuePair<T1, T2>&, long long) function

Prints pair to string.

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

Template parameters

ParameterDescription
T1First pair type argument.
T2Second pair type argument.

Arguments

ParameterTypeDescription
valueconst Collections::Generic::KeyValuePair<T1, T2>&Object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

Joint string representations of both first and second pair components.

System::TestPredicates::Details::PrintToStringImpl(const T&, long long) function

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

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)

Template parameters

ParameterDescription
TObject type.

Arguments

ParameterTypeDescription
containerconst T&Object to print.
slong longA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

Joint string representations of contained elements.

System::TestPredicates::Details::PrintToStringImpl(const T&, int) function

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

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

Template parameters

ParameterDescription
TObject type.

Arguments

ParameterTypeDescription
valueconst T&Object to print.
sintA service parameter which serves as a selector of function overload based on the type of this parameter; the value of the parameter is ignored

Return Value

String representations of object passed.

See Also