7 #ifndef IGLOO_EQUALSWITHDELTACONSTRAINT_H 8 #define IGLOO_EQUALSWITHDELTACONSTRAINT_H 10 #include "./expressions/expression.h" 14 template<
typename ExpectedType,
typename DeltaType >
18 : m_expected(expected), m_delta(delta)
22 template<
typename ActualType>
23 bool operator()(
const ActualType& actual)
const 25 return ((m_expected <= (actual + m_delta)) && (m_expected >= (actual - m_delta)));
28 ExpectedType m_expected;
32 template<
typename ExpectedType,
typename DeltaType >
38 template<
typename ExpectedType,
typename DeltaType >
43 std::ostringstream builder;
44 builder <<
"equal to " << snowhouse::Stringize(constraint.m_expected) <<
" (+/- " << snowhouse::Stringize(constraint.m_delta) <<
")";
Definition: equalswithdeltaconstraint.h:15
Definition: stringize.h:71
Definition: expression.h:17