forked from vieter-v/libvieter
test: add structure & framework for writing tests
This commit is contained in:
parent
3da95a63fb
commit
c018d8d86c
4 changed files with 1953 additions and 5 deletions
16
README.md
16
README.md
|
|
@ -13,6 +13,21 @@ Currently it contains the following:
|
|||
|
||||
## Development
|
||||
|
||||
### Compilation
|
||||
|
||||
Everything is handled by the provided Makefile. To compile the static library,
|
||||
simply run `make`.
|
||||
|
||||
### Testing
|
||||
|
||||
This library uses [Acutest](https://github.com/mity/acutest) for its tests.
|
||||
Tests should be placed in the `test` subdirectory, further divided into
|
||||
directories that correspond those in `src`. Test files should begin with
|
||||
`test_`, and their format should follow the expected format for Acutest.
|
||||
|
||||
To run the tests, simply run `make test`. If you wish to only run a specific
|
||||
test binary, you can find them in `build/test`.
|
||||
|
||||
### `compile_commands.json`
|
||||
|
||||
Clangd requires a `compile_commands.json` to function properly. You can
|
||||
|
|
@ -21,6 +36,7 @@ generate it using [bear](https://github.com/rizsotto/Bear):
|
|||
```sh
|
||||
make clean
|
||||
bear -- make
|
||||
bear --append -- make build-test
|
||||
```
|
||||
|
||||
This will create a `compile_commands.json` file in the current directory.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue