A minimal unit testing framework for C/C++ contained in a single header file.
MinUnit is a minimal unit testing framework for C and C++ that is entirely contained within a single header file. It provides a lightweight way to write and run unit tests with basic assertions and test suite organization, solving the need for simple testing without complex dependencies.
C and C++ developers who need a straightforward, dependency-free testing solution for small to medium projects, embedded systems, or educational purposes.
Developers choose MinUnit for its extreme simplicity and portability—it's just one header file, requires no build system integration, and provides essential testing features without bloat.
Minimal unit testing framework for C
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The entire framework is contained in one header file, eliminating build system dependencies and making integration as simple as a #include.
Provides core assertions like mu_check, mu_assert, and equality checks for ints, doubles, and strings, covering common testing needs without bloat.
Works with any C/C++ compiler and only requires standard libraries, making it ideal for embedded systems, cross-platform projects, or environments with strict dependency controls.
Reports test counts, assertion counts, failures, and execution time (real and process), giving clear, immediate feedback on test runs.
Requires linking -lrt for timers and -lm for double comparisons, adding build complexity that partially undermines the 'no dependencies' claim.
Lacks support for mocks, parameterized tests, or sophisticated fixtures, making it unsuitable for complex testing scenarios that require isolation or data-driven approaches.
Tests must be manually added to suites using MU_RUN_TEST, with no automatic test discovery, which can be tedious and error-prone as the test suite grows.