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{})
| 1223 | // require.Less(t, float64(1), float64(2)) |
| 1224 | // require.Less(t, "a", "b") |
| 1225 | func 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 | // |