// the find
ThrowTheSwitch/Unity
Simple unit testing for C
Unity is a unit testing framework for C, built primarily for embedded toolchains where a full test framework won't fit or compile cleanly. It's the core assertion/test-runner engine behind ThrowTheSwitch's ecosystem (Ceedling, CMock) but works standalone with any build system.
The core is one C file and two headers, so it drops into an existing embedded build without pulling in a package manager or build system change. Assertion macros are sized explicitly (INT8/16/32/64, HEX variants) which matters on embedded targets where silent integer promotion hides bugs. It's been validated against oddball toolchains — the test/targets directory includes IAR and HiTech PICC18 configs, not just GCC/Clang. Optional extras (fixture, memory, bdd) are separate opt-in modules rather than bundled into the core, so you're not carrying dead weight.
No mocking support — that's punted entirely to CMock, a separate project you have to wire in yourself. The test runner generation leans on Ruby scripts (auto/generate_test_runner.rb, rakefile), an odd dependency to bring into a C toolchain if you're not already using Ceedling. Parameterized/data-driven tests exist but are clunkier than what you'd get from a framework like Unity (Apple's) or Catch2 — you're writing more boilerplate per test case. Documentation is thorough but scattered across a dozen markdown files in docs/ rather than a single reference, so ramp-up takes longer than the 'single file' pitch suggests.