MCPcopy Index your code
hub / github.com/expr-lang/expr / InEpsilon

Function InEpsilon

internal/testify/require/require.go:938–946  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

936
937// InEpsilon asserts that expected and actual have a relative error less than epsilon
938func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
939 if h, ok := t.(tHelper); ok {
940 h.Helper()
941 }
942 if assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) {
943 return
944 }
945 t.FailNow()
946}
947
948// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
949func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {

Callers 1

InEpsilonMethod · 0.70

Calls 3

InEpsilonFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…