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

Function Greater

assert/assertion_compare.go:389–395  ·  view source on GitHub ↗

Greater asserts that the first element is greater than the second assert.Greater(t, 2, 1) assert.Greater(t, float64(2), float64(1)) assert.Greater(t, "b", "a")

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

Source from the content-addressed store, hash-verified

387// assert.Greater(t, float64(2), float64(1))
388// assert.Greater(t, "b", "a")
389func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
390 if h, ok := t.(tHelper); ok {
391 h.Helper()
392 }
393 failMessage := fmt.Sprintf("\"%v\" is not greater than \"%v\"", e1, e2)
394 return compareTwoValues(t, e1, e2, []compareResult{compareGreater}, failMessage, msgAndArgs...)
395}
396
397// GreaterOrEqual asserts that the first element is greater than or equal to the second
398//

Callers 5

GreaterFunction · 0.92
GreaterfFunction · 0.70
TestGreaterFunction · 0.70
GreaterMethod · 0.70

Calls 2

compareTwoValuesFunction · 0.85
HelperMethod · 0.65

Tested by 2

TestGreaterFunction · 0.56