Lines Matching refs:b
27 b := once.Once(key, func() interface{} { return "b" }).(string)
33 if b != "a" {
34 t.Errorf(`second call to Once with the same key should return "a": %q`, b)
58 b := once.Get(key).(string)
64 if b != "a" {
65 t.Errorf(`Get with the same key should return "a": %q`, b)
104 b := once.OnceStringSlice(key, func() []string { return []string{"a"} })
110 if b[0] != "a" {
111 t.Errorf(`second call to OnceStringSlice with the same key should return ["a"]: %q`, b)
119 …a, b := once.Once2StringSlice(key, func() ([]string, []string) { return []string{"a"}, []string{"b…
122 if a[0] != "a" || b[0] != "b" {
123 t.Errorf(`first call to Once2StringSlice should return ["a"], ["b"]: %q, %q`, a, b)
137 b := once.Once(key2, func() interface{} { return "b" }).(string)
143 if b != "b" {
144 t.Errorf(`second call to Once with the NewOnceKey from same string should return "b": %q`, b)
157 b := once.Once(key2, func() interface{} { return "b" }).(string)
163 if b != "a" {
164 t.Errorf(`second call to Once with the NewCustomOnceKey from equal key should return "a": %q`, b)
209 b := once.Once(key, func() interface{} {
214 if b != nil {
215 t.Errorf(`expected b to be nil, got %#v`, b)