---
name: "cgreen"
section: "5"
platform: "linux"
package: "libcgreen1-dev"
version: "1.6.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cgreen"
---

# cgreen(5)

a framework for C and C++ unit tests and mocking

## NAME

cgreen - a framework for C and C++ unit tests and mocking

## DESCRIPTION

**Cgreen** is a framework for creating and running compact and easy-to-read unittests for C and/or C++.

Here are some of its features:

- •

  Fluent API resulting 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 Before and After declarations

- •

  Extensible reporting mechanism

- •

  Fully composable test suites

- •

  An isolated test can be run in a single process for debugging

## SEE ALSO

[cgreen-runner(1)](/cgreen-runner/1.md)

The full documentation for **cgreen-runner** and **the Cgreen framework** is in the **Cgreen** manual available at
