(t *testing.T)
| 246 | } |
| 247 | |
| 248 | func TestWithAsciiBJunk(t *testing.T) { |
| 249 | isJunk := func(s string) bool { |
| 250 | return s == " " |
| 251 | } |
| 252 | sm := NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)), |
| 253 | splitChars(rep("a", 44)+rep("b", 40)), true, isJunk) |
| 254 | assertEqual(t, sm.bJunk, map[string]bool{}) |
| 255 | |
| 256 | sm = NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)), |
| 257 | splitChars(rep("a", 44)+rep("b", 40)+rep(" ", 20)), false, isJunk) |
| 258 | assertEqual(t, sm.bJunk, map[string]bool{" ": true}) |
| 259 | |
| 260 | isJunk = func(s string) bool { |
| 261 | return s == " " || s == "b" |
| 262 | } |
| 263 | sm = NewMatcherWithJunk(splitChars(rep("a", 40)+rep("b", 40)), |
| 264 | splitChars(rep("a", 44)+rep("b", 40)+rep(" ", 20)), false, isJunk) |
| 265 | assertEqual(t, sm.bJunk, map[string]bool{" ": true, "b": true}) |
| 266 | } |
| 267 | |
| 268 | func TestSFBugsRatioForNullSeqn(t *testing.T) { |
| 269 | sm := NewMatcher(nil, nil) |
nothing calls this directly
no test coverage detected