This is a RISC OS port of µnit, which 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.
This simple framework allows to run C Unit Tests directly on RISC OS, which helps to speed up coding process. Hopefully it will be useful to many in the community.
For more information on the original µnit, see: the µnit web site.
Simple, usual reason: RISC OS has a completely different File System than most modern OSes and deals with C/Headers and paths differently than other modern OSes, so pushing patches specifically for RISC OS to the original project is:
a) most likely of no interest for the original project b) will cause issues that are just related to how RISC OS deals with files (C files, Header files and paths) which would bring no added value to the original project.
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.
- Hiding output of successful tests.
This is easy, just make sure your filer has seen where your copy of !GCC is located on your RISC OS system and then double click on the MkGCC file to build everything.
To build with DDE you need to install both !UnixLib and also !UnixLib-Dev (both can be found via !Packman).
The build in DDE is broken at the moment due issues between UnixLib and DDE.
For the original µnit documentation see: the µnit web site.
Additionally, there is a heavily-commented test file example.c in the repository.