mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Rewrite fzf in Go
This commit is contained in:
17
src/atomicbool_test.go
Normal file
17
src/atomicbool_test.go
Normal file
@@ -0,0 +1,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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user