(t *testing.T)
| 172 | } |
| 173 | |
| 174 | func TestCaching(t *testing.T) { |
| 175 | once.Do(testSetup) |
| 176 | fills := countFills(func() { |
| 177 | for i := 0; i < 10; i++ { |
| 178 | var s string |
| 179 | if err := stringGroup.Get(dummyCtx, "TestCaching-key", StringSink(&s)); err != nil { |
| 180 | t.Fatal(err) |
| 181 | } |
| 182 | } |
| 183 | }) |
| 184 | if fills != 1 { |
| 185 | t.Errorf("expected 1 cache fill; got %d", fills) |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | func TestCacheEviction(t *testing.T) { |
| 190 | once.Do(testSetup) |
nothing calls this directly
no test coverage detected
searching dependent graphs…