(t *testing.T)
| 310 | } |
| 311 | |
| 312 | func TestStringFixedDistanceSetFilterSmallSet(t *testing.T) { |
| 313 | filter := stringFixedDistanceSetFilter(syntax.FixedDistanceSet{ |
| 314 | Chars: []rune{'a', 'c'}, |
| 315 | }, 1) |
| 316 | if filter == nil { |
| 317 | t.Fatal("expected filter") |
| 318 | } |
| 319 | if got, ok := filter("zzc", 0); !ok || got != 2 { |
| 320 | t.Fatalf("filter = %d, %v; want 2, true", got, ok) |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | func TestStringFixedDistanceSetFilterRejectsUnsupportedSets(t *testing.T) { |
| 325 | for _, set := range []syntax.FixedDistanceSet{ |
nothing calls this directly
no test coverage detected