Files
libsst/ZTestSuite/README.md
James Russell 71230f918f Add module READMEs, .gitignore, and remove Bin/ from tracking
Add README.md for each library module documenting API, platform
backends, and usage. Add .gitignore for build artifacts. Remove
pre-built binaries from version control.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 00:27:55 -05:00

45 lines
1.1 KiB
Markdown

# ZTestSuite
Unit test suite covering the libsst and ZUtil libraries.
## Running
```sh
make ztestsuite
./ZTestSuite.bin # interactive menu
./ZTestSuite.bin -n # run all tests non-interactively
./ZTestSuite.bin -r 5 # run test block #5
./ZTestSuite.bin -c # print total test count
```
## Test framework
Custom lightweight framework (`ZUnitTest.hpp`):
```cpp
static const char* testExample() {
TASSERT(1 + 1 == 2, "math is broken");
return ZTEST_SUCCESS;
}
```
Tests return an error string on failure or `ZTEST_SUCCESS` (empty string)
on pass.
## Coverage (48 test blocks, 60 test files)
**Math** -- Vec2/3/4 and Mat22/33/44 in float/double/int/unsigned variants,
geometry, transforms, safe arithmetic, endianness
**Containers** -- ZArray, ZList, ZHashMap, ZRingBuffer, ZBasicString (with
algorithm suites)
**Memory** -- ZAlloc, ZAllocWindow, ZSlabAllocator, ZReferenceCounter,
ZSmartPointer, ZWeakPointer
**I/O** -- JSON, XML, INI readers/writers, binary data writer
**Concurrency** -- threads, task streams
**Utilities** -- assertions, ZName, ZRegistry, random generation, simplex noise