ceph-csi/vendor/github.com/modern-go/concurrent/map_test.go

19 lines
269 B
Go
Raw Normal View History

2018-12-19 14:29:25 +00:00
package concurrent_test
import (
"github.com/modern-go/concurrent"
"testing"
)
func TestMap_Load(t *testing.T) {
m := concurrent.NewMap()
m.Store("hello", "world")
value, found := m.Load("hello")
if !found {
t.Fail()
}
if value != "world" {
t.Fail()
}
}