No description
- C 98.1%
- Makefile 1%
- Meson 0.9%
The double-underscores in the old version trigger trigger a -Wreserved-id-macro diagnostic in clang in C++ mode. The diagnostic is off by default and not even part of -Wextra, but it is in a public header which I'd like to be able to compile cleanly with -Weverything. C reserves everything starting with a double underscore (or a single underscore and an uppercase letter). I'm not sure if C++ really does reserve everything with a double underscore anywhere, but it doesn't really matter; the fact that clang generates a warning is reason enough for the change. This is a private symbol (hence the double underscore in the first place), so there is no down-side to moving it. |
||
|---|---|---|
| .appveyor.yml | ||
| .dir-locals.el | ||
| .gitignore | ||
| .travis.yml | ||
| COPYING | ||
| example.c | ||
| Makefile | ||
| meson.build | ||
| munit.c | ||
| munit.h | ||
| README.md | ||
µnit
µnit is a small but full-featured unit testing framework for C. It has no dependencies (beyond libc), is permissively licensed (MIT), and is easy to include into any project.
For more information, see the µnit web site.
Features
Features µnit currently includes include:
- Handy assertion macros which make for nice error messages.
- Reproducible cross-platform random number generation, including support for supplying a seed via CLI.
- Timing of both wall-clock and CPU time.
- Parameterized tests.
- Nested test suites.
- Flexible CLI.
- Forking (except on Windows).
- Hiding output of successful tests.
Features µnit does not currently include, but some day may include (a.k.a., if you file a PR…), include:
Include into your project with meson
In your subprojects folder put a munit.wrap file containing:
[wrap-git]
directory=munit
url=https://github.com/nemequ/munit/
revision=head
Then you can use a subproject fallback when you include munit as a
dependency to your project: dependency('munit', fallback: ['munit', 'munit_dep'])
Documentation
See the µnit web site.
Additionally, there is a heavily-commented example.c in the repository.