(t *testing.T)
| 251 | } |
| 252 | |
| 253 | func TestStringFixedDistanceSetFilterSmallSet(t *testing.T) { |
| 254 | filter := stringFixedDistanceSetFilter(syntax.FixedDistanceSet{ |
| 255 | Chars: []rune{'a', 'c'}, |
| 256 | }, 1) |
| 257 | if filter == nil { |
| 258 | t.Fatal("expected filter") |
| 259 | } |
| 260 | if got, ok := filter("zzc", 0); !ok || got != 2 { |
| 261 | t.Fatalf("filter = %d, %v; want 2, true", got, ok) |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | func TestStringFixedDistanceSetFilterRejectsUnsupportedSets(t *testing.T) { |
| 266 | for _, set := range []syntax.FixedDistanceSet{ |
nothing calls this directly
no test coverage detected