In header: #include <stub/compare.hpp>
template <class Compare>
struct compare
bool | operator() (Value v) |
Type | Name | Value | Description |
---|---|---|---|
Compare | m_compare |
The comparison function. |
An object used to customize comparison of specific arguments when comparing two function calls.
Example:
bool test(uint32_t v)
{
return v == 1U;
}
stub::compare<bool(*)(uint32_t)> compare = { test };
assert(compare(1U) == true);
assert(compare(2U) == false);