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

Method InDeltaf

require/require_forward.go:751–756  ·  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

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

Callers

nothing calls this directly

Calls 2

InDeltafFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected