MCPcopy Create free account
hub / github.com/cpputest/cpputest / DoublesEqualFailure

Method DoublesEqualFailure

src/CppUTest/TestFailure.cpp:192–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192DoublesEqualFailure::DoublesEqualFailure(UtestShell* test, const char* fileName, size_t lineNumber, double expected, double actual, double threshold, const SimpleString& text)
193: TestFailure(test, fileName, lineNumber)
194{
195 message_ = createUserText(text);
196
197 message_ += createButWasString(StringFrom(expected, 7), StringFrom(actual, 7));
198 message_ += " threshold used was <";
199 message_ += StringFrom(threshold, 7);
200 message_ += ">";
201
202 if (PlatformSpecificIsNan(expected) || PlatformSpecificIsNan(actual) || PlatformSpecificIsNan(threshold))
203 message_ += "\n\tCannot make comparisons with Nan";
204}
205
206CheckEqualFailure::CheckEqualFailure(UtestShell* test, const char* fileName, size_t lineNumber, const SimpleString& expected, const SimpleString& actual, const SimpleString& text)
207: TestFailure(test, fileName, lineNumber)

Callers

nothing calls this directly

Calls 1

StringFromFunction · 0.70

Tested by

no test coverage detected