7 #ifndef IGLOO_ENDSWITHCONSTRAINT_H 8 #define IGLOO_ENDSWITHCONSTRAINT_H 10 #include "./expressions/expression.h" 14 template <
typename ExpectedType>
18 : m_expected(expected) {}
20 bool operator()(
const std::string& actual)
const 22 size_t expectedPos = actual.length() - m_expected.length();
23 return actual.find(m_expected) == expectedPos;
26 ExpectedType m_expected;
29 template<
typename ExpectedType >
40 template<
typename ExpectedType >
45 std::ostringstream builder;
46 builder <<
"ends with " << snowhouse::Stringize(constraint.m_expected);
Definition: endswithconstraint.h:15
Definition: stringize.h:71
Definition: expression.h:17