mirror of
https://github.com/danog/liquid.git
synced 2024-11-26 23:24:38 +01:00
17 lines
372 B
Go
17 lines
372 B
Go
package values
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestIsEmpty(t *testing.T) {
|
|
require.True(t, IsEmpty(false))
|
|
require.False(t, IsEmpty(true))
|
|
require.True(t, IsEmpty([]string{}))
|
|
require.True(t, IsEmpty(map[string]interface{}{}))
|
|
require.False(t, IsEmpty([]string{""}))
|
|
require.False(t, IsEmpty(map[string]interface{}{"k": "v"}))
|
|
}
|