struct stub::compare

In header: #include <stub/compare.hpp>

Template parameters

template <class Compare>
struct compare

Member functions (public)

bool operator() (Value v)

Member variables (public)

Type Name Value Description
Compare

m_compare

  The comparison function.

Description

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);

Member Function Descriptions

template <class Value>
bool operator() (Value v)
Call operator which calls the compare function with the passed value.
Versions
7.1.1
7.1.0
7.0.0
Development
latest