CMock | CMock - Mock/stub generator for C | Mock library

 by   ThrowTheSwitch C Version: v2.5.3 License: MIT

kandi X-RAY | CMock Summary

kandi X-RAY | CMock Summary

CMock is a C library typically used in Testing, Mock applications. CMock has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

CMock - Mock/stub generator for C

            kandi-support Support

              CMock has a low active ecosystem.
              It has 568 star(s) with 255 fork(s). There are 51 watchers for this library.
              It had no major release in the last 12 months.
              There are 117 open issues and 170 have been closed. On average issues are closed in 165 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of CMock is v2.5.3

            kandi-Quality Quality

              CMock has 0 bugs and 0 code smells.

            kandi-Security Security

              CMock has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              CMock code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              CMock is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              CMock releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 5347 lines of code, 202 functions and 46 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CMock
            Get all kandi verified functions for this library.

            CMock Key Features

            No Key Features are available at this moment for CMock.

            CMock Examples and Code Snippets

            No Code Snippets are available at this moment for CMock.

            Community Discussions


            Compiler flag definitions with Ceedling
            Asked 2021-Oct-06 at 07:29

            I have embedded system project, which I'm testing with Ceedling (=Unity and Cmock).

            In one test case code under test is that simple:



            Answered 2021-Oct-06 at 06:28

            Instead of looking for a way to disable the warning, deal with the issue that the warning is about. That is, use the portable format specifiers from inttypes.h. These are the most correct to use when printing the stdint.h types.



            CMakeLists - How to include a directory of source and header files?
            Asked 2021-Jul-09 at 16:35

            I feel like this question has been asked a bunch of times, but none of the answers I have found seem to be working for me. I'm extremely new to CMake and C/C++ as I come from the world of Java, and am struggling to understand cmake and how it works.

            Anyways, basically I have the folder structure below. This is an esp-idf project, so I don't know if that has anything to do with what I'm running into.



            Answered 2021-Jul-09 at 13:46

            The ESP-IDF build system is built on top of CMake. This means you can use all the standard features of CMake in your files. However, the the ESP-IDF system predefines many functions, and makes many assumptions about the layout of your project, supposedly to make things "easier". Instead of reading CMake documentation, start by reading and understanding the ESP-IDF build system documentation:


            It looks to me like there is a particular layout expected for subcomponents, including the format of the CMakeLists.txt file. Specifically, move Metriful under a new directory called components, or add Metriful to EXTRA_COMPONENT_DIRS near the top of your root CMakeLists.txt

            If Metriful is not written as an esp-idf component, this may not work. However, the document also describes how to link to "pure CMake" components, which will look something like this (at the end of your root CMakeLists.txt).



            Can we use ceedling with Bazel?
            Asked 2021-Jun-24 at 16:03

            I'm working on unit tests for a c embedded project with Bazel, first I tested the code with Ceedling (Unity and cmock) and It worked. And now, I'm trying to merge to Bazel but I did not find any document about using ceedling with Bazel.



            Answered 2021-Jun-24 at 16:03

            I have made a quick research and it looks like there is no ceedling support for Bazel. You could write some custom rules for stuff you have mentioned, but I guess, that rewriting to Bazel rules will be much easier and maintainable



            CMock mock some functions but not others from same module
            Asked 2020-Apr-02 at 06:01
            void func1(void);
            void func2(void;


            Answered 2020-Apr-02 at 06:01

            To my knowledge, you can't. You must split the header file into two and generate mocks for once of them.

            There are unit test frameworks that can mock one or more functions in a header file, Nala (which I'm maintaining) for example. But I guess you want to use CMock with Ceedling, so it's not really an option.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install CMock

            You can download it from GitHub.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone ThrowTheSwitch/CMock

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link