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

Function TestNotEmpty

internal/testify/assert/assertions_test.go:1615–1636  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1613}
1614
1615func TestNotEmpty(t *testing.T) {
1616
1617 mockT := new(testing.T)
1618 chWithValue := make(chan struct{}, 1)
1619 chWithValue <- struct{}{}
1620
1621 False(t, NotEmpty(mockT, ""), "Empty string is empty")
1622 False(t, NotEmpty(mockT, nil), "Nil is empty")
1623 False(t, NotEmpty(mockT, []string{}), "Empty string array is empty")
1624 False(t, NotEmpty(mockT, 0), "Zero int value is empty")
1625 False(t, NotEmpty(mockT, false), "False value is empty")
1626 False(t, NotEmpty(mockT, make(chan struct{})), "Channel without values is empty")
1627 False(t, NotEmpty(mockT, [1]int{}), "array is state")
1628
1629 True(t, NotEmpty(mockT, "something"), "Non Empty string is not empty")
1630 True(t, NotEmpty(mockT, errors.New("something")), "Non nil object is not empty")
1631 True(t, NotEmpty(mockT, []string{"something"}), "Non empty string array is not empty")
1632 True(t, NotEmpty(mockT, 1), "Non-zero int value is not empty")
1633 True(t, NotEmpty(mockT, true), "True value is not empty")
1634 True(t, NotEmpty(mockT, chWithValue), "Channel with values is not empty")
1635 True(t, NotEmpty(mockT, [1]int{42}), "array is not state")
1636}
1637
1638func Test_getLen(t *testing.T) {
1639 falseCases := []interface{}{

Callers

nothing calls this directly

Calls 3

FalseFunction · 0.70
NotEmptyFunction · 0.70
TrueFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…