Class NamedValueComparator¶
Defined in File NamedValueComparator.hpp
Inheritance Relationships¶
Derived Types¶
public mu::tiny::mock::FunctionComparator(Class FunctionComparator)public mu::tiny::mock::TypedMockComparator< T >(Template Class TypedMockComparator)
Class Documentation¶
-
class NamedValueComparator¶
[source] Abstract interface for comparing values of a custom mock parameter type.
Implement both pure virtual methods and pass an instance to mu::tiny::mock::Support::install_comparator(). The comparator’s lifetime must extend at least as long as the test (or SupportPlugin scope).
Subclassed by mu::tiny::mock::FunctionComparator, mu::tiny::mock::TypedMockComparator< T >
Public Functions
-
virtual bool is_equal(const void *object1, const void *object2) = 0¶
Return true if
object1andobject2are equal.Both pointers point to objects of the type associated with this comparator.
- Parameters:
object1 – Pointer to the first object (typically the expected value).
object2 – Pointer to the second object (typically the actual value).
- Returns:
true if the two objects are considered equal.
-
virtual bool is_equal(const void *object1, const void *object2) = 0¶