blob: 0af457010cb99a26b575c03bd01a5a96a85fcc75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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")
}
}
|