Skip to content
Myr

atomicbool_test.go

This file

Path

src/util/atomicbool_test.go

17 lines · 301 bytes · Go

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 76efddd point at it.

bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd

lines 1–17why, one step back
1package util
23import "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}