You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
375 B

package sync
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestDefaultValue(t *testing.T) {
t.Parallel()
v := NewBool(false)
assert.False(t, v.IsSet())
v = NewBool(true)
assert.True(t, v.IsSet())
}
func TestSetUnSet(t *testing.T) {
t.Parallel()
v := NewBool(false)
v.Set()
assert.True(t, v.IsSet())
v.UnSet()
assert.False(t, v.IsSet())
}