summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/kit/kit_test.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/kit/kit_test.h b/source/kit/kit_test.h
index a6bf2ea..b102b73 100644
--- a/source/kit/kit_test.h
+++ b/source/kit/kit_test.h
@@ -5,11 +5,13 @@
//
// Header-only unit-testing and microbenchmarks framework for C.
//
+//
// - Define a unique KIT_TEST_FILE for each file to avoid name
// collisions.
//
// - Define KIT_TEST_IMPLEMENTATION to include the implementation.
//
+//
// Optional settings
//
// - KIT_TESTS_SIZE_LIMIT
@@ -20,6 +22,24 @@
// - KIT_BENCH_REPEATS_DEFAULT_1
// - KIT_BENCH_REPEATS_DEFAULT_2
//
+//
+// Usage example
+//
+// // foo.test.c
+// #define KIT_TEST_FILE // This is required if you want to use
+// // multiple test files.
+// #include "kit_test.h"
+// TEST("foo") {
+// REQUIRE(1);
+// REQUIRE_EQ(2 + 2, 4);
+// }
+//
+// // main.c
+// #include "kit_test.h"
+// int main(int argc, char **argv) {
+// return run_tests(argc, argv);
+// }
+//
// ================================================================
//
// The MIT License