(t *testing.T)
| 176 | } |
| 177 | |
| 178 | func TestWithAsciiBJunk(t *testing.T) { |
| 179 | isJunk := func(s string) bool { |
| 180 | return s == " " |
| 181 | } |
| 182 | sm := NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)), |
| 183 | splitChars(rep("a", 44)+rep("b", 40)), true, isJunk) |
| 184 | assertEqual(t, sm.bJunk, map[string]struct{}{}) |
| 185 | |
| 186 | sm = NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)), |
| 187 | splitChars(rep("a", 44)+rep("b", 40)+rep(" ", 20)), false, isJunk) |
| 188 | assertEqual(t, sm.bJunk, map[string]struct{}{" ": {}}) |
| 189 | |
| 190 | isJunk = func(s string) bool { |
| 191 | return s == " " || s == "b" |
| 192 | } |
| 193 | sm = NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)), |
| 194 | splitChars(rep("a", 44)+rep("b", 40)+rep(" ", 20)), false, isJunk) |
| 195 | assertEqual(t, sm.bJunk, map[string]struct{}{" ": {}, "b": {}}) |
| 196 | } |
| 197 | |
| 198 | func TestSFBugsRatioForNullSeqn(t *testing.T) { |
| 199 | sm := NewMatcher(nil, nil) |
nothing calls this directly
no test coverage detected