(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestStringIndexPrefixFilterASCIIIgnoreCase(t *testing.T) { |
| 53 | filter := stringIndexPrefixFilter("abc", true, 3) |
| 54 | if filter == nil { |
| 55 | t.Fatal("expected filter") |
| 56 | } |
| 57 | |
| 58 | candidateByteIndex, ok := filter("xxABc", 0) |
| 59 | if !ok { |
| 60 | t.Fatal("expected candidate") |
| 61 | } |
| 62 | if got, want := candidateByteIndex, 2; got != want { |
| 63 | t.Fatalf("candidateByteIndex = %d, want %d", got, want) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func TestStringIndexPrefixFilterRejectsNonASCIIIgnoreCasePrefix(t *testing.T) { |
| 68 | if filter := stringIndexPrefixFilter("é", true, 1); filter != nil { |
nothing calls this directly
no test coverage detected