1 #include "ReturnMatcher.hpp"
3 ReturnMatcher
&ReturnMatcher::operator=(ReturnMatcher
&&rm
) {
4 memc
= exchange(rm
.memc
, nullptr);
5 expected
= rm
.expected
;
9 bool ReturnMatcher::match(const memcached_return_t
&arg
) const {
10 return arg
== expected
;
13 ReturnMatcher
ReturnMatcher::success() {
14 return ReturnMatcher
{memc
};
17 ReturnMatcher
ReturnMatcher::operator()(memcached_return_t expected_
) {
18 return ReturnMatcher
{memc
, expected_
};
21 string
ReturnMatcher::describe() const {
22 return "is " + to_string(expected
)
23 + "\n actual: " + memcached_last_error_message(memc
);
26 ReturnMatcher::ReturnMatcher(ReturnMatcher
&&rm
) {