MCPcopy
hub / github.com/minio/minio-go / TestDo

Function TestDo

pkg/singleflight/singleflight_test.go:85–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestDo(t *testing.T) {
86 var g Group[string, any]
87 v, err, _ := g.Do("key", func() (any, error) {
88 return "bar", nil
89 })
90 if got, want := fmt.Sprintf("%v (%T)", v, v), "bar (string)"; got != want {
91 t.Errorf("Do = %v; want %v", got, want)
92 }
93 if err != nil {
94 t.Errorf("Do error = %v", err)
95 }
96}
97
98func TestDoErr(t *testing.T) {
99 var g Group[string, any]

Callers

nothing calls this directly

Calls 1

DoMethod · 0.80

Tested by

no test coverage detected