MCPcopy Create free account
hub / github.com/stretchr/testify / Positive

Function Positive

require/require.go:1890–1898  ·  view source on GitHub ↗

Positive asserts that the specified element is positive require.Positive(t, 1) require.Positive(t, 1.23)

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

Source from the content-addressed store, hash-verified

1888// require.Positive(t, 1)
1889// require.Positive(t, 1.23)
1890func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) {
1891 if h, ok := t.(tHelper); ok {
1892 h.Helper()
1893 }
1894 if assert.Positive(t, e, msgAndArgs...) {
1895 return
1896 }
1897 t.FailNow()
1898}
1899
1900// Positivef asserts that the specified element is positive
1901//

Callers 1

PositiveMethod · 0.70

Calls 3

PositiveFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected