From 73319aae43fdc9d352326948b9481c6ca4ecb00e Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Sun, 7 Oct 2018 16:30:53 +0300 Subject: Make test output more friendly to they eyes! --- res/check_ck | 15 ++++++--------- unit/ck-test.c | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/res/check_ck b/res/check_ck index 437b39b..3f6c618 100755 --- a/res/check_ck +++ b/res/check_ck @@ -5,7 +5,7 @@ TEST_LOCATION=$(realpath @PROJECT_TESTING_GROUNDS@) # used in regression tests function running { - echo "--[TESTING $1]--" + echo "=> testing $1" } # used in regression tests @@ -36,20 +36,18 @@ function clear_tests { } function unit_tests { - echo -e "################################" - echo -e "########## Unit Tests ##########" - echo -e "################################" + echo -e "Unit Tests:" + echo -e "~~~~~~~~~~~" ./ck-test } function regression_tests { - echo -e "######################################" - echo -e "########## Regression Tests ##########" - echo -e "######################################" + echo -e "Regression Tests:" + echo -e "~~~~~~~~~~~~~~~~~" DIR=@BIN_TESTS_DIR@ for i in $( ls $DIR ); do ERROR="TEST "$i" FAILED:" - PASS="--[TEST "$i" PASSED]--\n" + PASS="$i passed\n" source $DIR/$i wait $! done @@ -61,7 +59,6 @@ function err { exit 1 } - function run { unit_tests regression_tests diff --git a/unit/ck-test.c b/unit/ck-test.c index 59a8809..42941f9 100644 --- a/unit/ck-test.c +++ b/unit/ck-test.c @@ -28,9 +28,9 @@ void ck_list_add() { int main() { #define X(TEST, DESC) \ - printf("--[%s]--\n", DESC); \ + printf("=> %s\n", DESC); \ TEST(); \ - printf("--[Passed]--\n\n"); + printf("Passed\n\n"); CK_UNIT_TESTS #undef X } -- cgit v1.2.3