UNITTESTS.md (605B)
1 Before building and running the tests, install [Check](https://libcheck.github.io/check/) 2 (and [pkg-config](https://pkg-config.freedesktop.org/) or 3 [pkgconf](https://github.com/pkgconf/pkgconf) to find Check's includes and libs). These 4 are dependencies for tests and only for tests. 5 6 To build and run the tests from the top-level Makefile, simply run: 7 8 ```shell 9 make test 10 ``` 11 12 Verified to work with recent BSD and GNU make. 13 14 To add more `stralloc` tests, copy the `test_stralloc_thingy` example in 15 `tests/unittest_stralloc.c`. To add other tests, copy the 16 `unittest_stralloc` example in `tests/Makefile`.