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

Function InDeltaf

internal/testify/assert/assertion_format.go:354–359  ·  view source on GitHub ↗

InDeltaf asserts that the two numerals are within delta of each other. assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")

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

Source from the content-addressed store, hash-verified

352//
353// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
354func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {
355 if h, ok := t.(tHelper); ok {
356 h.Helper()
357 }
358 return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
359}
360
361// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
362func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool {

Callers 2

InDeltafFunction · 0.92
InDeltafMethod · 0.70

Calls 2

InDeltaFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…