https://github.com/fuwn/tatl
🗣 Tiny Test Framework for C89
https://github.com/fuwn/tatl
c c89 test
Last synced: about 1 month ago
JSON representation
🗣 Tiny Test Framework for C89
- Host: GitHub
- URL: https://github.com/fuwn/tatl
- Owner: Fuwn
- License: gpl-3.0
- Created: 2022-06-15T03:11:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-20T03:07:52.000Z (over 3 years ago)
- Last Synced: 2025-03-10T16:00:23.153Z (11 months ago)
- Topics: c, c89, test
- Language: C
- Homepage: https://github.com/Fuwn/tael
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tatl
Tiny Test Framework for C89
## Usage
For simply C++ integration, checkout [Tael](https://github.com/Fuwn/tael)!
### Complex
Tatl can be used via it's included testing context and utilities.
An example of this method of using Tatl can be seen in
[`examples/addition.c`](examples/addition.c).
### Macro
Tatl can be used via an included set of utility macros.
```c
#include
TATL_TEST(addition_works) { return TATL_IS(2 + 2, 4); }
int main(void) {
TATL_NEW();
TATL_ADD("add works", addition_works);
TATL_FINISH();
return 0;
}
```
The output with the previous example:
```shell
running 4 tests
dummy ... ok (0ms)
add works ... ok (0ms)
dummy long ... ok (0ms)
should fail ... FAILED (0ms)
test result: FAILED. 3 passed (4 steps); 1 failed (0ms)
```
## Examples
More examples can be found in the [`examples/`](examples) directory.
## License
This project is licensed with the [GNU General Public License v3.0](LICENSE).