@@ -29,9 +29,9 @@ func foldForTest(r rune, normalize bool) rune {
2929}
3030
3131// The prefilter is only safe on items whose runes cannot become ASCII. This
32- // pins util.MayFoldToAscii as a superset of the runes that actually can, over
33- // the whole Unicode range and both normalization modes. If normalize.go or the
34- // Go unicode tables change, this fails.
32+ // verifies util.MayFoldToAscii as a superset of the runes that actually can,
33+ // over the whole Unicode range and both normalization modes. If normalize.go
34+ // or the Go unicode tables change, this fails.
3535func TestMayFoldToAsciiIsSuperset (t * testing.T ) {
3636 missed := 0
3737 for r := rune (utf8 .RuneSelf ); r <= unicode .MaxRune ; r ++ {
@@ -51,8 +51,8 @@ func TestMayFoldToAsciiIsSuperset(t *testing.T) {
5151 }
5252}
5353
54- // Scripts that must stay unflagged, otherwise the prefilter never engages for
55- // them and Step C buys nothing .
54+ // Scripts that must stay unflagged, otherwise the prefilter never runs for
55+ // them and Step C has no effect .
5656func TestMayFoldToAsciiExcludesMajorScripts (t * testing.T ) {
5757 for _ , s := range []struct {
5858 name string
@@ -62,9 +62,9 @@ func TestMayFoldToAsciiExcludesMajorScripts(t *testing.T) {
6262 {"Arabic" , 0x0600 , 0x06FF }, {"Thai" , 0x0E00 , 0x0E7F }, {"Devanagari" , 0x0900 , 0x097F },
6363 {"CJK" , 0x4E00 , 0x9FFF }, {"Hangul" , 0xAC00 , 0xD7A3 }, {"kana" , 0x3040 , 0x30FF },
6464 {"box drawing" , 0x2500 , 0x257F }, {"emoji" , 0x1F300 , 0x1FAFF },
65- // These sit between the Latin blocks and were swallowed by an earlier,
66- // wider grouping of foldableRanges. General Punctuation is the costly
67- // one: curly quotes, en and em dashes and the ellipsis live there .
65+ // These sit between the Latin blocks and were included in an earlier,
66+ // wider grouping of foldableRanges. General Punctuation matters most:
67+ // curly quotes, en and em dashes and the ellipsis are in it .
6868 {"Greek Extended" , 0x1F00 , 0x1FFF }, {"General Punctuation" , 0x2000 , 0x206F },
6969 {"Currency Symbols" , 0x20A0 , 0x20CF }, {"CJK Symbols" , 0x3000 , 0x303F },
7070 } {
@@ -257,7 +257,7 @@ func TestNormalizeRuneUnchangedByGuard(t *testing.T) {
257257
258258// Step G lets non-ASCII pattern runes use the scan, but only when no other
259259// rune can transform into them. Being uncased is not sufficient: U+00DF has no
260- // simple uppercase yet U+1E9E lowercases onto it. This pins the guard against
260+ // simple uppercase yet U+1E9E lowercases onto it. This checks the guard against
261261// the full preimage relation over all of Unicode.
262262func TestRunePrefilterableGuardIsSound (t * testing.T ) {
263263 preimage := map [rune ][]rune {}
@@ -306,7 +306,7 @@ func TestRunePrefilterableGuardIsSound(t *testing.T) {
306306 }
307307}
308308
309- // The Step G path must actually engage and reject, otherwise the equivalence
309+ // The Step G path must actually run and reject, otherwise the equivalence
310310// test above proves nothing about non-ASCII patterns.
311311func TestNonAsciiPatternPrefilterEngages (t * testing.T ) {
312312 rng := rand .New (rand .NewSource (6 ))
@@ -413,7 +413,7 @@ func FuzzRunePrefilter(f *testing.F) {
413413 }
414414 chars := util .ToChars ([]byte (input ))
415415 if chars .IsBytes () {
416- return // byte mode is the existing fuzzers' territory
416+ return // byte mode is covered by the existing fuzzers
417417 }
418418 for _ , cs := range []bool {false , true } {
419419 for _ , norm := range []bool {false , true } {
0 commit comments