MCPcopy Index your code
hub / github.com/expr-lang/expr / Positive

Function Positive

internal/testify/assert/assertion_compare.go:438–444  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

436// assert.Positive(t, 1)
437// assert.Positive(t, 1.23)
438func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool {
439 if h, ok := t.(tHelper); ok {
440 h.Helper()
441 }
442 zero := reflect.Zero(reflect.TypeOf(e))
443 return compareTwoValues(t, e, zero.Interface(), []compareResult{compareGreater}, "\"%v\" is not positive", msgAndArgs...)
444}
445
446// Negative asserts that the specified element is negative
447//

Callers 5

PositiveFunction · 0.92
PositivefFunction · 0.70
TestPositiveFunction · 0.70
PositiveMethod · 0.70

Calls 3

compareTwoValuesFunction · 0.85
HelperMethod · 0.45
ZeroMethod · 0.45

Tested by 2

TestPositiveFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…