From 23e63540f2d3ff6da230d1a29aecf33b49d2874d Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Fri, 16 Feb 2024 02:37:41 +0100 Subject: Update kit --- source/kit/test.h | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'source/kit/test.h') diff --git a/source/kit/test.h b/source/kit/test.h index b6be132..24a25c9 100644 --- a/source/kit/test.h +++ b/source/kit/test.h @@ -3,7 +3,7 @@ // test.h // https://guattari.tech/git/kit // -// Header-only unit-testing and microbenchmarks framework for C. +// Header-only unit-testing and microbenchmarks library for C. // // // - Define a unique KIT_TEST_FILE for each file to avoid name @@ -35,6 +35,7 @@ // } // // // main.c +// #define KIT_TEST_IMPLEMENTATION // #include "test.h" // int main(int argc, char **argv) { // return run_tests(argc, argv); @@ -44,7 +45,7 @@ // // The MIT License // -// Copyright (c) 2022-2023 Mitya Selivanov +// Copyright (c) 2022-2024 Mitya Selivanov // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -273,21 +274,18 @@ void kit_bench_register(char const *name, char const *file, int kit_run_benchmarks(int argc, char **argv); -#ifndef KIT_DISABLE_SHORT_NAMES -# define TEST KIT_TEST -# define REQUIRE KIT_REQUIRE -# define REQUIRE_EQ KIT_REQUIRE_EQ -# define BENCHMARK KIT_BENCHMARK -# define BENCHMARK_REPEAT KIT_BENCHMARK_REPEAT -# define BENCHMARK_BEGIN KIT_BENCHMARK_BEGIN -# define BENCHMARK_END KIT_BENCHMARK_END -# define DO_NOT_OPTIMIZE KIT_DO_NOT_OPTIMIZE - -# define test_register kit_test_register -# define run_tests kit_run_tests -# define bench_register kit_bench_register -# define run_benchmarks kit_run_benchmarks -#endif +#define TEST KIT_TEST +#define REQUIRE KIT_REQUIRE +#define REQUIRE_EQ KIT_REQUIRE_EQ +#define BENCHMARK KIT_BENCHMARK +#define BENCHMARK_REPEAT KIT_BENCHMARK_REPEAT +#define BENCHMARK_BEGIN KIT_BENCHMARK_BEGIN +#define BENCHMARK_END KIT_BENCHMARK_END +#define DO_NOT_OPTIMIZE KIT_DO_NOT_OPTIMIZE +#define test_register kit_test_register +#define run_tests kit_run_tests +#define bench_register kit_bench_register +#define run_benchmarks kit_run_benchmarks #ifdef __cplusplus } -- cgit v1.2.3