variant_spy Class Reference

Class for spying on functions that take a variant as a parameter. More...

#include <atria/testing/spies.hpp>

Classes

struct  all_variants
 

Public Member Functions

template<typename T >
void operator() (const T &)
 
template<typename T = all_variants>
std::size_t count () const
 
template<typename VariantT >
auto visitor () -> decltype(std::bind( static_cast< void(*)(variant_spy &, const VariantT &)>( &boost::apply_visitor< variant_spy, const VariantT >), std::ref(*this), std::placeholders::_1))
 

Detailed Description

Class for spying on functions that take a variant as a parameter.

It will visit the variant that is passed on each call, and count the number of ocurrences for every type.

Todo:
Add support for checking the actual values that were passed.

Definition at line 52 of file spies.hpp.


The documentation for this class was generated from the following file:
Fork me on GitHub