<< got_str
<< "\"";
}
-#if (defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED)
+#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
else if (typeid(__expected) == typeid(memcached_return_t))
{
libtest::stream::make_cerr(file, line, func) << "Expected \""
{
if (__expected != __actual)
{
- libtest::stream::make_cerr(file, line, func) << "Expected \"" << __expected << "\" got \"" << __actual << "\" Additionally: \"" << __hint << "\"";
+ if (typeid(__expected) == typeid(test_return_t))
+ {
+ const char *expected_str= test_strerror(test_return_t(__expected));
+ const char *got_str= test_strerror(test_return_t(__actual));
+ libtest::stream::make_cerr(file, line, func) << "Expected \""
+ << expected_str
+ << "\" got \""
+ << got_str
+ << "\""
+ << " Additionally: \"" << __hint << "\"";
+ }
+#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
+ else if (typeid(__expected) == typeid(memcached_return_t))
+ {
+ libtest::stream::make_cerr(file, line, func) << "Expected \""
+ << memcached_strerror(NULL, memcached_return_t(__expected))
+ << "\" got \""
+ << memcached_strerror(NULL, memcached_return_t(__actual)) << "\""
+ << " Additionally: \"" << __hint << "\"";
+ }
+#endif
+#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN
+ else if (typeid(__expected) == typeid(gearman_return_t))
+ {
+ libtest::stream::make_cerr(file, line, func) << "Expected \""
+ << gearman_strerror(gearman_return_t(__expected))
+ << "\" got \""
+ << gearman_strerror(gearman_return_t(__actual)) << "\""
+ << " Additionally: \"" << __hint << "\"";
+ }
+#endif
+ else
+ {
+ libtest::stream::make_cerr(file, line, func) << "Expected \"" << __expected << "\" got \"" << __actual << "\""
+ << " Additionally: \"" << __hint << "\"";
+ }
return false;
}