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

Function IsNonDecreasing

assert/assertion_order.go:79–81  ·  view source on GitHub ↗

IsNonDecreasing asserts that the collection is not decreasing assert.IsNonDecreasing(t, []int{1, 1, 2}) assert.IsNonDecreasing(t, []float{1, 2}) assert.IsNonDecreasing(t, []string{"a", "b"})

(t TestingT, object interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

77// assert.IsNonDecreasing(t, []float{1, 2})
78// assert.IsNonDecreasing(t, []string{"a", "b"})
79func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
80 return isOrdered(t, object, []compareResult{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...)
81}

Callers 5

IsNonDecreasingFunction · 0.92
IsNonDecreasingfFunction · 0.70
TestIsNonDecreasingFunction · 0.70
IsNonDecreasingMethod · 0.70

Calls 1

isOrderedFunction · 0.85

Tested by 2

TestIsNonDecreasingFunction · 0.56