MCPcopy
hub / github.com/expr-lang/expr / TestNotEmptyWrapper

Function TestNotEmptyWrapper

internal/testify/assert/forward_assertions_test.go:372–388  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

370}
371
372func TestNotEmptyWrapper(t *testing.T) {
373 assert := New(t)
374 mockAssert := New(new(testing.T))
375
376 assert.False(mockAssert.NotEmpty(""), "Empty string is empty")
377 assert.False(mockAssert.NotEmpty(nil), "Nil is empty")
378 assert.False(mockAssert.NotEmpty([]string{}), "Empty string array is empty")
379 assert.False(mockAssert.NotEmpty(0), "Zero int value is empty")
380 assert.False(mockAssert.NotEmpty(false), "False value is empty")
381
382 assert.True(mockAssert.NotEmpty("something"), "Non Empty string is not empty")
383 assert.True(mockAssert.NotEmpty(errors.New("something")), "Non nil object is not empty")
384 assert.True(mockAssert.NotEmpty([]string{"something"}), "Non empty string array is not empty")
385 assert.True(mockAssert.NotEmpty(1), "Non-zero int value is not empty")
386 assert.True(mockAssert.NotEmpty(true), "True value is not empty")
387
388}
389
390func TestLenWrapper(t *testing.T) {
391 assert := New(t)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
FalseMethod · 0.45
NotEmptyMethod · 0.45
TrueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…