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

Function InEpsilonf

assert/assertion_format.go:385–390  ·  view source on GitHub ↗

InEpsilonf asserts that expected and actual have a relative error less than epsilon

(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

383
384// InEpsilonf asserts that expected and actual have a relative error less than epsilon
385func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {
386 if h, ok := t.(tHelper); ok {
387 h.Helper()
388 }
389 return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...)
390}
391
392// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
393func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool {

Callers 2

InEpsilonfFunction · 0.92
InEpsilonfMethod · 0.70

Calls 2

InEpsilonFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected