commit 8fa4b8b8dc70bab372d2ffd8fcb05546bfe7e2cc
parent 0609d1b3eb8381cf3144f362c3e7bad668d5511c
Author: Rolf Eike Beer <eike@sf-mail.de>
Date: Mon, 11 May 2020 18:45:20 +0200
add minimal unittest documentation
Diffstat:
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/CHANGES b/CHANGES
@@ -1,3 +1,4 @@
+20200511 add first unittest, run with "make test"
20191227 fixed possible overflow in alloc() with allocations close to 4GiB
20191226 add missing return types to main()
20190919 fix ipme with multiple addresses on the same interface on platforms
diff --git a/UNITTESTS.md b/UNITTESTS.md
@@ -0,0 +1,16 @@
+Before building and running the tests, install [Check](https://libcheck.github.io/check/)
+(and [pkg-config](https://pkg-config.freedesktop.org/) or
+[pkgconf](https://github.com/pkgconf/pkgconf) to find Check's includes and libs). These
+are dependencies for tests and only for tests.
+
+To build and run the tests from the top-level Makefile, simply run:
+
+```shell
+make test
+```
+
+Verified to work with recent BSD and GNU make.
+
+To add more ```stralloc``` tests, copy the ```test_stralloc_thingy``` example in
+```tests/unittest_stralloc.c```. To add other tests, copy the
+```unittest_stralloc``` example in ```tests/Makefile```.