#ifndef HELPERS_EQUALS_POINTER_H_ #define HELPERS_EQUALS_POINTER_H_ #include "bandit/bandit.h" #include namespace snowhouse { using namespace std; template struct EqualsPointerConstraint : Expression> { EqualsPointerConstraint(const ExpectedType& expected) : expected(expected) {} template bool operator()(const ActualType& actual) const { return *expected == *actual; } ExpectedType expected; }; template struct Stringizer> { static string ToString(const EqualsPointerConstraint& constraint) { ostringstream builder; builder << "pointer to " << snowhouse::Stringize(constraint.expected); return builder.str(); } }; template inline EqualsPointerConstraint EqualsPointer(const ExpectedType& expected) { return EqualsPointerConstraint(expected); } } #endif // HELPERS_EQUALS_POINTER_H_