X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2Flib%2FReturnMatcher.cpp;h=926214e74a829a998e9106e18708af7860c92650;hb=c517ea843a0a97a17fb695dde2d27d739d51ffe2;hp=cbc9a95bc4607fc0f9e9ee4618c5ebef7bbc94b3;hpb=c27e726da1b07ef20a1cabb235f7924a9fed4170;p=awesomized%2Flibmemcached diff --git a/test/lib/ReturnMatcher.cpp b/test/lib/ReturnMatcher.cpp index cbc9a95b..926214e7 100644 --- a/test/lib/ReturnMatcher.cpp +++ b/test/lib/ReturnMatcher.cpp @@ -1,7 +1,13 @@ #include "ReturnMatcher.hpp" bool ReturnMatcher::match(const memcached_return_t &arg) const { - return arg == expected; + if (arg != expected) { + if (expected == MEMCACHED_SUCCESS && arg == MEMCACHED_BUFFERED && memc) { + return memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS); + } + return false; + } + return true; } ReturnMatcher ReturnMatcher::success() {