mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
28 lines
375 B
Go
28 lines
375 B
Go
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())
|
|
}
|