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

Function LessOrEqual

assert/assertion_compare.go:430–436  ·  view source on GitHub ↗

LessOrEqual asserts that the first element is less than or equal to the second assert.LessOrEqual(t, 1, 2) assert.LessOrEqual(t, 2, 2) assert.LessOrEqual(t, "a", "b") assert.LessOrEqual(t, "b", "b")

(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

428// assert.LessOrEqual(t, "a", "b")
429// assert.LessOrEqual(t, "b", "b")
430func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
431 if h, ok := t.(tHelper); ok {
432 h.Helper()
433 }
434 failMessage := fmt.Sprintf("\"%v\" is not less than or equal to \"%v\"", e1, e2)
435 return compareTwoValues(t, e1, e2, []compareResult{compareLess, compareEqual}, failMessage, msgAndArgs...)
436}
437
438// Positive asserts that the specified element is positive
439//

Callers 5

LessOrEqualFunction · 0.92
LessOrEqualfFunction · 0.70
TestLessOrEqualFunction · 0.70
LessOrEqualMethod · 0.70

Calls 2

compareTwoValuesFunction · 0.85
HelperMethod · 0.65

Tested by 2

TestLessOrEqualFunction · 0.56