diff --git a/src/log/normal.c b/src/log/normal.c index 9399a8a..cb68d54 100644 --- a/src/log/normal.c +++ b/src/log/normal.c @@ -30,6 +30,7 @@ #include "criterion/options.h" #include "criterion/ordered-set.h" #include "timer.h" +#include "config.h" #define NORMALIZE(Str) (criterion_options.use_ascii ? "" : Str) @@ -40,6 +41,10 @@ #define FG_BLUE NORMALIZE("\e[0;34m") #define RESET NORMALIZE("\e[0m") +void normal_log_pre_all(UNUSED struct criterion_test_set *set) { + criterion_info("[%s====%s] Criterion v%s\n", FG_BLUE, RESET, VERSION); +} + void normal_log_pre_init(struct criterion_test *test) { criterion_info("[%sRUN%s ] %s::%s\n", FG_BLUE, RESET, test->category, test->name); } @@ -120,6 +125,7 @@ void normal_log_pre_suite(struct criterion_suite_set *set) { } struct criterion_output_provider normal_logging = { + .log_pre_all = normal_log_pre_all, .log_pre_init = normal_log_pre_init, .log_pre_suite = normal_log_pre_suite, .log_post_test = normal_log_post_test, diff --git a/src/main.c b/src/main.c index 1f489fb..dde6ec2 100644 --- a/src/main.c +++ b/src/main.c @@ -29,9 +29,9 @@ #include #include #include "runner.h" +#include "config.h" -# define VERSION "v1.0.0" -# define VERSION_MSG "Tests compiled with Criterion " VERSION "\n" +# define VERSION_MSG "Tests compiled with Criterion v" VERSION "\n" # define USAGE \ VERSION_MSG "\n" \