https://github.com/risc-os-community/munit
This is a port to RISC OS of the munit library for C Unit Testing
https://github.com/risc-os-community/munit
c coding gcc hacktoberfest hacktoberfest2022 library risc-os riscos testing testing-library unit-testing
Last synced: 3 months ago
JSON representation
This is a port to RISC OS of the munit library for C Unit Testing
- Host: GitHub
- URL: https://github.com/risc-os-community/munit
- Owner: RISC-OS-Community
- License: other
- Created: 2021-09-08T18:11:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-17T19:43:17.000Z (over 2 years ago)
- Last Synced: 2025-01-15T00:46:06.909Z (about 1 year ago)
- Topics: c, coding, gcc, hacktoberfest, hacktoberfest2022, library, risc-os, riscos, testing, testing-library, unit-testing
- Language: C
- Homepage:
- Size: 76.2 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# �nit
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](https://nemequ.github.io/munit).
## Why a Port to RISC OS?
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
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.
### How to build it
#### Building using GCC
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.
#### Building using DDE
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.
## Documentation
For the original �nit documentation see: [the �nit web site](https://nemequ.github.io/munit).
Additionally, there is a heavily-commented test file
[example.c](./tests/example.c) in the repository.