···4242 // worse, so what we do instead is just validate that what we get back is
4343 // acceptable.
4444 if err := quick.Check(func(s string, maxFreq uint16) bool {
4545+ // Ensure maximum frequency is nonzero so that random sampling will work
4646+ maxFreq = max(maxFreq, 1)
4747+4548 ngramOffs := splitNGrams([]byte(s))
4649 if len(ngramOffs) == 0 {
4750 return true
···75787679func TestFindSelectiveNGrams(t *testing.T) {
7780 if err := quick.Check(func(s string, maxFreq uint16) bool {
8181+ // Ensure maximum frequency is nonzero so that random sampling will work
8282+ maxFreq = max(maxFreq, 1)
8383+7884 ngramOffs := splitNGrams([]byte(s))
7985 if len(ngramOffs) == 0 {
8086 return true