#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
#include <libmemcached-1.0/memcached.h>
#include <libmemcachedutil-1.0/ostream.hpp>
+#include <libtest/memcached.hpp>
#endif
#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN
return true;
}
+template <class T1_comparable, class T2_comparable>
+bool _compare_strcmp(const char *file, int line, const char *func, const T1_comparable& __expected, const T2_comparable& __actual)
+{
+ if (__expected == NULL)
+ {
+ fatal_message("Expected value was NULL, programmer error");
+ }
+
+ if (__actual == NULL)
+ {
+ libtest::stream::make_cerr(file, line, func) << "Expected " << __expected << " but got NULL";
+ return false;
+ }
+
+ if (strncmp(__expected, __actual, strlen(__expected)))
+ {
+ libtest::stream::make_cerr(file, line, func) << "Expected " << __expected << " passed \"" << __actual << "\"";
+ return false;
+ }
+
+ return true;
+}
+
template <class T_comparable>
bool _compare_zero(const char *file, int line, const char *func, T_comparable __actual)
{