atomicbool_test.go
This file
Path
src/util/atomicbool_test.go
17 lines · 301 bytes · Go
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than a1bcdc2 point at it.
Add pledge(2) support (OpenBSD only) via a 'protector' package. (#1297)Aaron Bieberbefore adoptiona1bcdc2
lines 1–17why, one step back1package util23import "testing"45func TestAtomicBool(t *testing.T) {6 if !NewAtomicBool(true).Get() || NewAtomicBool(false).Get() {7 t.Error("Invalid initial value")8 }910 ab := NewAtomicBool(true)11 if ab.Set(false) {12 t.Error("Invalid return value")13 }14 if ab.Get() {15 t.Error("Invalid state")16 }17}