IsNull()

TestTools::IsNull(T) method

Checks if specific value is null. Version for arithmetic and enum types.

template<typename T> static std::enable_if<std::is_arithmetic<T>::value||std::is_enum<T>::value, bool>::type System::TestTools::IsNull(T obj)

Template parameters

ParameterDescription
TType of value being checked.

Arguments

ParameterTypeDescription
objTValue to check for null.

Return Value

Always returns false.

TestTools::IsNull(const T&) method

Checks if specific value is null. Version for non-arithmetic and non-enum value types.

template<typename T> static std::enable_if<!std::is_arithmetic<T>::value &&!std::is_enum<T>::value, bool>::type System::TestTools::IsNull(const T &obj)

Template parameters

ParameterDescription
TType of value being checked.

Arguments

ParameterTypeDescription
objconst T&Value to check for null.

Return Value

True if object is compared to nullptr as true, false otherwise.

TestTools::IsNull(const SharedPtr<T>&) method

Checks if specific value is null. Version for non-arithmetic value types.

template<typename T> static bool System::TestTools::IsNull(const SharedPtr<T> &obj)

Template parameters

ParameterDescription
TType of value being checked.

Arguments

ParameterTypeDescription
objconst SharedPtr<T>&Value to check for null.

Return Value

True if object is compared to nullptr as true, false otherwise.

TestTools::IsNull(System::Collections::Generic::KeyValuePair<K, V>&) method

Checks if specific value is null. Version for key-value pairs.

template<typename K,typename V> static bool System::TestTools::IsNull(System::Collections::Generic::KeyValuePair<K, V> &kvp)

Template parameters

ParameterDescription
KKey type.
VValue type.

Arguments

ParameterTypeDescription
kvpSystem::Collections::Generic::KeyValuePair<K, V>&Pair object.

Return Value

True if pair is considered null, false otherwise.

TestTools::IsNull(const System::String&) method

Checks if string is null.

static bool System::TestTools::IsNull(const System::String &str)

Arguments

ParameterTypeDescription
strconst System::String&String to check.

Return Value

True if string is considered null, false otherwise.

See Also