blob: b5917e87279d8ee1b27f21f529f065adf0901bb0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# LS Test Harness
Minimal, single-header unit test framework for C.
- Auto-registers test functions.
- Header-only.
- Macros: `ASSERT_EQ`, `ASSERT`, etc.
- ANSI C with minimal extensions.
## Quick Start
1. Copy `ls_test.h` to your project.
2. In one C file:
```c
#define LS_TEST_IMPLEMENTATION
#include "ls_test.h"
```
3. Write tests:
```c
TEST_CASE(my_test) {
ASSERT_EQ(add(1,2), 3, "%d");
return 0;
}
```
4. Add main:
```c
TEST_MAIN
```
5. Compile and run.
## License
MIT.
## Links
- [Website](https://libls.org)
- [GitHub](https://github.com/libls/test.git)
- [LibLS Git](https://git.libls.org/test.git)
|