MCPcopy
hub / github.com/stretchr/testify / InDeltaf

Method InDeltaf

assert/assertion_forward.go:750–755  ·  view source on GitHub ↗

InDeltaf asserts that the two numerals are within delta of each other. a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted")

(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

748//
749// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
750func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
751 if h, ok := a.t.(tHelper); ok {
752 h.Helper()
753 }
754 return InDeltaf(a.t, expected, actual, delta, msg, args...)
755}
756
757// InEpsilon asserts that expected and actual have a relative error less than epsilon
758func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {

Callers

nothing calls this directly

Calls 2

InDeltafFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected