detailed tests

This commit is contained in:
2026-08-26 21:50:20 +02:00
parent fe3f152492
commit 3fcb3dbc05
7 changed files with 3448 additions and 44 deletions
+10 -1
View File
@@ -20,7 +20,16 @@ If you want to contribute, please make a pull request and I'll review it. If you
If you change an existing type, please run **make** in *build/* directory and **ctest** to ensure compatibility hasn't been broken.
If it's new, please write a **test** for it in *tests/test_<name>.c* so others can see the guidelines on how the type is used.
Since the whole point is memory safety, please also run the suite with the sanitizers before opening a pull request:
```sh
cmake -S . -B build-asan -DDLIBC_SANITIZE=ON && cmake --build build-asan
ctest --test-dir build-asan --output-on-failure
```
Use `ctest -V` to see every individual assertion, and `-DDLIBC_C_STANDARD=23` to build against C23 instead of the default C11.
If it's new, please write a **test** for it in *tests/test_<name>.c* so others can see the guidelines on how the type is used. The tests use a tiny in-tree harness, *tests/dtest.h*, which is just a list of named cases and some `CHECK_` macros - there is no external framework to install.
## Legal Mumbo Jumbo
Licensed under the MIT License (because GPL doesn't make sense for this (sorry Stallman))