MCPcopy
hub / github.com/expr-lang/expr / InEpsilon

Method InEpsilon

internal/testify/assert/assertion_forward.go:744–749  ·  view source on GitHub ↗

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

(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

742
743// InEpsilon asserts that expected and actual have a relative error less than epsilon
744func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {
745 if h, ok := a.t.(tHelper); ok {
746 h.Helper()
747 }
748 return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...)
749}
750
751// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
752func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {

Callers 1

TestInEpsilonWrapperFunction · 0.45

Calls 2

InEpsilonFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestInEpsilonWrapperFunction · 0.36