diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-22 01:25:40 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-22 01:25:40 -0700 |
commit | 073bd3550bef184924c9655a9ce1bb339a84aae3 (patch) | |
tree | 20f8c3b235c97c9802bd7d9512b186b50299b0e6 | |
parent | 9f28e53c71d28d04e2775c59944d2887a99f1e86 (diff) | |
download | stm32l4-073bd3550bef184924c9655a9ce1bb339a84aae3.tar.gz stm32l4-073bd3550bef184924c9655a9ce1bb339a84aae3.tar.bz2 stm32l4-073bd3550bef184924c9655a9ce1bb339a84aae3.zip |
Change test output to display the [PASS] before the test name.
-rw-r--r-- | 02-usart/test_harness/test_harness.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/02-usart/test_harness/test_harness.c b/02-usart/test_harness/test_harness.c index 87606ee..a0a2a33 100644 --- a/02-usart/test_harness/test_harness.c +++ b/02-usart/test_harness/test_harness.c @@ -104,10 +104,10 @@ static int execute_test(test_t* test) if (!do_fork) { if ((ec = setjmp(jmpbuf)) == 0) { test->fn_ptr(); - printf("%s " GREEN "[PASS]" RESET "\n", fullname); + printf(GREEN "[PASS]" RESET " %s\n", fullname); return 0; } else { - printf("%s " RED "[FAIL] %d" RESET "\n", fullname, ec); + printf(RED "[FAIL] (%d)" RESET " %s\n", ec, fullname); return ec; } } @@ -130,10 +130,10 @@ static int execute_test(test_t* test) if (WIFEXITED(status)) { switch ((ec = WEXITSTATUS(status))) { case 0: - printf("%s " GREEN "[PASS]" RESET "\n", fullname); + printf(GREEN "[PASS]" RESET " %s\n", fullname); return 0; default: - printf("%s " RED "[FAIL] %d" RESET "\n", fullname, ec); + printf(RED "[FAIL] (%d)" RESET " %s\n", ec, fullname); return ec; } } else if (WIFSIGNALED(status)) { |