Skip to content

Commit

Permalink
Tweak fprintf() arguments in test/main.c slightly, for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbarnes committed Nov 9, 2024
1 parent b161ae8 commit 3be257e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,12 @@ int main(int argc, char *argv[])

timing = timing && !clock_gettime(CLOCK_MONOTONIC, &times[1]);

const char *red = ctx.failed ? ctx.boldred : "";
const char *sgr0 = ctx.failed ? ctx.sgr0 : "";
fprintf (
stderr,
"\n TOTAL %u passed, %s%u failed%s",
ctx.passed,
ctx.failed ? ctx.boldred : "", ctx.failed, ctx.sgr0
ctx.passed, red, ctx.failed, sgr0
);

if (timing) {
Expand Down

0 comments on commit 3be257e

Please sign in to comment.