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

Function Less

require/require.go:1225–1233  ·  view source on GitHub ↗

Less asserts that the first element is less than the second require.Less(t, 1, 2) require.Less(t, float64(1), float64(2)) require.Less(t, "a", "b")

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

Source from the content-addressed store, hash-verified

1223// require.Less(t, float64(1), float64(2))
1224// require.Less(t, "a", "b")
1225func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {
1226 if h, ok := t.(tHelper); ok {
1227 h.Helper()
1228 }
1229 if assert.Less(t, e1, e2, msgAndArgs...) {
1230 return
1231 }
1232 t.FailNow()
1233}
1234
1235// LessOrEqual asserts that the first element is less than or equal to the second
1236//

Callers 1

LessMethod · 0.70

Calls 3

LessFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected