Hasty Briefsbeta

FakeIt: C++ Mocking Made Easy

4 days ago
  • #Mocking Framework
  • #Unit Testing
  • #C++
  • FakeIt is a simple mocking framework for C++ supporting GCC, Clang, and MS Visual C++.
  • Written in C++11, it can test both C++11 and C++ projects.
  • Provides a simple API with expressive Arrange-Act-Assert syntax.
  • Supports mocking classes or spying existing objects in one line.
  • No limitation on the number of method arguments and supports dynamic casting.
  • Pre-configured for major unit testing frameworks like GoogleTest, MSTest, Boost.Test, etc.
  • Header-only framework, packaged as a single header file for easy integration.
  • Includes pre-packaged versions for different unit testing frameworks.
  • Supports installation via CMake, Conan, and vcpkg.
  • Has limitations: no support for multiple or virtual inheritance, not thread-safe, and specific compiler optimizations required.