mirror of https://github.com/junegunn/fzf
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
300 B
Go
18 lines
300 B
Go
package fzf
|
|
|
|
import "testing"
|
|
|
|
func TestAtomicBool(t *testing.T) {
|
|
if !NewAtomicBool(true).Get() || NewAtomicBool(false).Get() {
|
|
t.Error("Invalid initial value")
|
|
}
|
|
|
|
ab := NewAtomicBool(true)
|
|
if ab.Set(false) {
|
|
t.Error("Invalid return value")
|
|
}
|
|
if ab.Get() {
|
|
t.Error("Invalid state")
|
|
}
|
|
}
|