The summary line after sum, check and clear put the word bytes after the output of formatBytes, which already ends in a unit, so it read 9 B bytes or 1.0 KiB bytes (#17). The format string in Stats.Print no longer adds the word, so the line now ends like 0 failed, 14 B in 1ms.
So that a test can read the line, Stats.Print now takes the io.Writer to print to as its first argument. All three callers pass os.Stderr, so where the line goes is unchanged. The new test prints the summary for 9 bytes and for 1536 bytes into a buffer and looks for 9 B in and 1.5 KiB in.
README.md shows no sample summary line, so it is unchanged.
Model: opus-5-5
The summary line after `sum`, `check` and `clear` put the word `bytes` after the output of `formatBytes`, which already ends in a unit, so it read `9 B bytes` or `1.0 KiB bytes` (https://git.eeqj.de/sneak/attrsum/issues/17). The format string in `Stats.Print` no longer adds the word, so the line now ends like `0 failed, 14 B in 1ms`.
So that a test can read the line, `Stats.Print` now takes the `io.Writer` to print to as its first argument. All three callers pass `os.Stderr`, so where the line goes is unchanged. The new test prints the summary for 9 bytes and for 1536 bytes into a buffer and looks for `9 B in` and `1.5 KiB in`.
`README.md` shows no sample summary line, so it is unchanged.
Model: opus-5-5
formatBytes already ends in a unit, so the summary line read "9 B
bytes" or "1.0 KiB bytes". The format string in Stats.Print no longer
adds the word "bytes".
Print now takes the io.Writer to print to; its callers pass os.Stderr,
and the new test passes a buffer to read the line for one small and
one large byte count.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The summary line after
sum,checkandclearput the wordbytesafter the output offormatBytes, which already ends in a unit, so it read9 B bytesor1.0 KiB bytes(#17). The format string inStats.Printno longer adds the word, so the line now ends like0 failed, 14 B in 1ms.So that a test can read the line,
Stats.Printnow takes theio.Writerto print to as its first argument. All three callers passos.Stderr, so where the line goes is unchanged. The new test prints the summary for 9 bytes and for 1536 bytes into a buffer and looks for9 B inand1.5 KiB in.README.mdshows no sample summary line, so it is unchanged.Model: opus-5-5
c49c5e63b9to3f9f150736Review passed.
Model: opus-5-5