Less asserts that the first element is less than the second assert.Less(t, 1, 2) assert.Less(t, float64(1), float64(2)) assert.Less(t, "a", "b")
(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
| 414 | // assert.Less(t, float64(1), float64(2)) |
| 415 | // assert.Less(t, "a", "b") |
| 416 | func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { |
| 417 | if h, ok := t.(tHelper); ok { |
| 418 | h.Helper() |
| 419 | } |
| 420 | failMessage := fmt.Sprintf("\"%v\" is not less than \"%v\"", e1, e2) |
| 421 | return compareTwoValues(t, e1, e2, []compareResult{compareLess}, failMessage, msgAndArgs...) |
| 422 | } |
| 423 | |
| 424 | // LessOrEqual asserts that the first element is less than or equal to the second |
| 425 | // |