19 #ifndef IRCCD_TEST_MOCK_HPP
20 #define IRCCD_TEST_MOCK_HPP
28 #include <initializer_list>
30 #include <unordered_map>
43 using args = std::vector<std::any>;
48 using functions = std::unordered_map<std::string, std::vector<args>>;
68 auto find(
const std::string& name)
const -> std::vector<args>;
75 void clear(
const std::string& name)
const noexcept;
87 auto
empty() const noexcept ->
bool;
92 #endif // !IRCCD_TEST_MOCK_HPP
auto find(const std::string &name) const -> std::vector< args >
void push(std::string name, args args={}) const
auto empty() const noexcept -> bool
Keep track of function invocations.
Definition: mock.hpp:38
void clear() const noexcept
std::vector< std::any > args
Functions arguments.
Definition: mock.hpp:43
void clear(const std::string &name) const noexcept
Namespace for unit tests.
Definition: broken_plugin.hpp:29
std::unordered_map< std::string, std::vector< args > > functions
Map of all functions.
Definition: mock.hpp:48