Tag Mock

FFF a mocking frameowork for C

This post is a continuation from a previous post called Unity; unit test for C, but in this post we are going to use FFF. FFF is one of the available mocking frameworks for C. In this example I will use CMake to configure the project and build it. All the code and configuration files used in this post are available in this repo in GitHub. Why do we need to mock functions? To answer that question I will introduce the signature of the two methods I will use during this post. The first function is... (read more)

Unit test with Google Mock for C++

This post is a continuation from a previous post called Unit test with Google Test for C++, but in this post we are going to use Google Mock, that extends the functionality of Google Test. Google Mock is one of the available frameworks for C++ to mock objects in unit tests. In this example I will use the same technologies as for the previous one: CMake to configure the project and build it, for the dependency manager I will use the new and shiny conan. All the code and configuration files used in... (read more)