aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: b9c59331b6919fdb66284b16d877d2be5d6a803f (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
# 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.