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

Function Test_isEmpty

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

Source from the content-addressed store, hash-verified

1541}
1542
1543func Test_isEmpty(t *testing.T) {
1544
1545 chWithValue := make(chan struct{}, 1)
1546 chWithValue <- struct{}{}
1547
1548 True(t, isEmpty(""))
1549 True(t, isEmpty(nil))
1550 True(t, isEmpty([]string{}))
1551 True(t, isEmpty(0))
1552 True(t, isEmpty(int32(0)))
1553 True(t, isEmpty(int64(0)))
1554 True(t, isEmpty(false))
1555 True(t, isEmpty(map[string]string{}))
1556 True(t, isEmpty(new(time.Time)))
1557 True(t, isEmpty(time.Time{}))
1558 True(t, isEmpty(make(chan struct{})))
1559 True(t, isEmpty([1]int{}))
1560 False(t, isEmpty("something"))
1561 False(t, isEmpty(errors.New("something")))
1562 False(t, isEmpty([]string{"something"}))
1563 False(t, isEmpty(1))
1564 False(t, isEmpty(true))
1565 False(t, isEmpty(map[string]string{"Hello": "World"}))
1566 False(t, isEmpty(chWithValue))
1567 False(t, isEmpty([1]int{42}))
1568}
1569
1570func TestEmpty(t *testing.T) {
1571

Callers

nothing calls this directly

Calls 3

isEmptyFunction · 0.85
TrueFunction · 0.70
FalseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…