(t *testing.T)
| 207 | } |
| 208 | |
| 209 | func TestMemoizeStr(t *testing.T) { |
| 210 | cnt := 0 |
| 211 | slowStringFn := func() string { |
| 212 | cnt++ |
| 213 | return "slow" |
| 214 | } |
| 215 | stringer := MemoizeStr(slowStringFn) |
| 216 | require.Equal(t, "slow", stringer.String()) |
| 217 | require.Equal(t, "slow", stringer.String()) |
| 218 | require.Equal(t, 1, cnt) |
| 219 | } |
| 220 | |
| 221 | func BenchmarkDoMatch(b *testing.B) { |
| 222 | escape := byte('\\') |
nothing calls this directly
no test coverage detected
searching dependent graphs…