#pragma once
#include <typeinfo>
-#include <libtest/strerror.h>
#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
#include <libmemcached/memcached.h>
namespace libtest {
template <class T_comparable, class T_hint>
-bool _compare_true_hint(const char *file, int line, const char *func, T_comparable __expected, const char *assertation_label, T_hint __hint)
+bool _compare_truth_hint(const char *file, int line, const char *func, T_comparable __expected, const char *assertation_label, T_hint __hint)
{
if (__expected == false)
{
return true;
}
+template <class T_comparable>
+bool _truth(const char *file, int line, const char *func, T_comparable __truth)
+{
+ if (bool(__truth))
+ {
+ libtest::stream::make_cerr(file, line, func) << "Assertion failed for " << func << "() with \"" << __truth << "\"";
+ return false;
+ }
+
+ return true;
+}
+
template <class T_comparable, class T_hint>
bool _compare_hint(const char *file, int line, const char *func, T_comparable __expected, T_comparable __actual, T_hint __hint)
{