https://github.com/maxim2266/mite
Minimalist test framework for C language.
https://github.com/maxim2266/mite
c test testing testing-framework
Last synced: 10 months ago
JSON representation
Minimalist test framework for C language.
- Host: GitHub
- URL: https://github.com/maxim2266/mite
- Owner: maxim2266
- License: bsd-3-clause
- Created: 2021-03-16T19:04:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-15T20:42:18.000Z (over 1 year ago)
- Last Synced: 2024-12-30T09:42:14.719Z (over 1 year ago)
- Topics: c, test, testing, testing-framework
- Language: C
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mite: minimalist test framework for C language.
[](https://opensource.org/licenses/BSD-3-Clause)
### Usage
Add file `mite.c` to the target project and include `mite.h` header into every test source.
The framework defines its own `main` function, so the file with the project's `main` should
be excluded from the test set-up.
Test case example:
```C
#include "mite.h"
TEST_CASE(my_test_case)
{
...
TEST(some_ptr != NULL);
TESTF(some_value > 0, "invalid value %d", some_value);
...
}
```
Every binary compiled with this framework also accepts command line options:
```
▶ test_mite_binary --help
Usage: test_mite_binary [OPTION]...
Options:
-a, --all do not stop at the first failed test
-f, --filter PATTERN run only the tests matching the given
regular expression PATTERN
-h, --help show this message and exit
```
#### Status
Tested on Linux Mint 20.1.