CGREEN(5)
πΈ NAME πΈ
cgreen β bestie, it's a whole framework for C and C++ unit tests and mocking π
β¨ DESCRIPTION β¨
Okay so Cgreen is a framework for making and running unit tests for C and/or C++, and the whole point is that they're compact and easy-to-read. Like, tests you can actually look at without your soul leaving your body π«Ά
Here's the lineup of features, no cap:
- Fluent API that results in very readable tests π
- Expressive and clear output using the default reporter β¨
- Fully functional mocks, both strict and loose π
- Each test runs in its own process for test suite robustness π₯
- Automatic discovery and running of tests using dynamic library inspection π
- Extensive and expressive constraints for many datatypes π
- BDD-flavoured test declarations with
BeforeandAfterdeclarations π¦ - Extensible reporting mechanism π§
- Fully composable test suites β
- An isolated test can be run in a single process for debugging π
π SEE ALSO π
The full documentation for cgreen-runner and the Cgreen framework lives in the Cgreen manual, which you can find on GitHub at β¨https://github.com/cgreen-devs/cgreenβ© π
and that's the tea, bestie π this was the CGREEN(5) page, hanging out in the File Formats Manual section of your friendly neighbourhood man pages. go write some tests that actually spark joy β¨π
π¦ where this page comes from
- alpine 3.24: cgreen-doc 1.6.4-r0 Β· ISC
- debian trixie: libcgreen1-dev 1.6.4-1 Β· ISC
- epel 10: cgreen-runner 1.6.5-2.el10_3 Β· ISC
- fedora 43: cgreen-runner 1.6.2-4.fc41 Β· ISC
- fedora 43: cgreen-runner 1.6.5-2.fc43 Β· ISC
- fedora 44: cgreen-runner 1.6.3-1.fc44 Β· ISC
- fedora 44: cgreen-runner 1.6.5-2.fc44 Β· ISC
- nixos 26.05: cgreen 1.6.4
- nixpkgs unstable: cgreen 1.6.5
- ubuntu jammy: libcgreen1-dev 1.3.0-2 Β· ISC
- ubuntu noble: libcgreen1-dev 1.6.3-1build1 Β· ISC
- ubuntu questing: libcgreen1-dev 1.6.4-1build1
- ubuntu resolute: libcgreen1-dev 1.6.4-3 Β· ISC
- ubuntu stonking: libcgreen1-dev 1.7.0-1 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms