Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
testing: align -v output #10594
The go test output might be easier to read if it test function names were aligned, much like gofmt treats struct definitions. Here's what it normally looks like:
Here's how a tiny bit of formatting could improve things:
All that would be needed for those using a fixed-width font would be to add two spaces after "RUN". I am a little bothered by the inconsistency of "RUN" vs "PASS:", the latter having a colon, but it's inconsistent in having the time as well.
In the likely event no one depends on the particular format, this issue is trivial. After all, it's -v output.
Given that @robpike added this to the Go1.5 milestone, and given his comment, I think that it was closed by accident. Re-opening.
If we're repainting sheds, we could reduce the noise levels while we're at it and remove those pesky inconsistent colons:
=== RUN TestGroupContextListings PASS TestGroupContextListings (0.00s) === RUN TestIdentifyCompletedTasks FAIL TestIdentifyCompletedTasks (0.00s) === RUN TestIdentifyStalledProjects PASS TestIdentifyStalledProjects (0.00s) === RUN TestIdentifyFinishedProjects PASS TestIdentifyFinishedProjects (0.00s) FAIL
I thought briefly that the hyphens might be to help keep things roughly aligned for those using variable-width fonts, but hyphens have different width than equal signs anyway. If we want that, an en dash will be much closer:
=== RUN TestGroupContextListings ––– PASS TestGroupContextListings (0.00s) === RUN TestIdentifyCompletedTasks ––– FAIL TestIdentifyCompletedTasks (0.00s) === RUN TestIdentifyStalledProjects ––– PASS TestIdentifyStalledProjects (0.00s) === RUN TestIdentifyFinishedProjects ––– PASS TestIdentifyFinishedProjects (0.00s) FAIL
@josharian the "---" might be there to help separate that from
I.e. consider fuller output:
I've see some multi-line t.Log messages use "\n\t…" to line up so it'd be nice to not change the leading tab used for those.