mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 14:50:24 +00:00
19 lines
269 B
Go
19 lines
269 B
Go
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()
|
|
}
|
|
}
|