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

Method InDelta

internal/testify/require/require_forward.go:696–701  ·  view source on GitHub ↗

InDelta asserts that the two numerals are within delta of each other. a.InDelta(math.Pi, 22/7.0, 0.01)

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

Source from the content-addressed store, hash-verified

694//
695// a.InDelta(math.Pi, 22/7.0, 0.01)
696func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
697 if h, ok := a.t.(tHelper); ok {
698 h.Helper()
699 }
700 InDelta(a.t, expected, actual, delta, msgAndArgs...)
701}
702
703// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
704func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {

Callers 1

TestInDeltaWrapperFunction · 0.45

Calls 2

InDeltaFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestInDeltaWrapperFunction · 0.36