cmockery2
« Back to VersTracker
Description:
Reviving cmockery unit test framework from Google
Type: Formula  |  Latest Version: 1.3.9@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: testing c unit-testing mocking development
Install: brew install cmockery2
About:
Cmockery2 is a unit testing framework for C that revives and modernizes Google's original cmockery library. It provides developers with a lightweight, portable solution for creating mock objects and writing unit tests in C. The framework simplifies testing by offering intuitive macros for setting expectations, verifying calls, and handling memory allocation.
Key Features:
  • Mock object creation and management
  • Memory allocation tracking and leak detection
  • Portable across different platforms and compilers
  • Simple API with minimal dependencies
Use Cases:
  • Unit testing C applications with mocked dependencies
  • Memory leak detection in C codebases
  • Testing legacy C code without major refactoring
Alternatives:
  • CMocka – More actively maintained but with different API design
  • Unity – Simpler framework, lacks built-in mocking capabilities
  • GoogleTest – C++ focused, heavier weight than cmockery2
License: Apache-2.0
Bottles available for: arm64_sequoia, arm64_sonoma, arm64_ventura, arm64_monterey, arm64_big_sur, sonoma, ventura, monterey, big_sur, catalina, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Nov 17, 2024 8:37pm 0 VERSION_BUMP e93fa81a
Sep 14, 2024 8:02pm 0 VERSION_BUMP dd7a1bae