Get the latest tech news

FakeIt: C++ Mocking Made Easy


C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking. - eranpeer/FakeIt

GoogleTest: gtest MSTest: mstest Boost.Test: boost Catch2: catch tpunit++: tpunit mettle: mettle Qt Test: qtest NUnit: nunit CUTE: cute doctest: doctest Without a unit test framework: standalone <fakeit_folder>/single_header/ gtest<fakeit_folder>/single_header/mstest<fakeit_folder>/single_header/boost<fakeit_folder>/single_header/ catch- (v2 and v3)<fakeit_folder>/single_header/ tpunit<fakeit_folder>/single_header/ mettle<fakeit_folder>/single_header/qtest<fakeit_folder>/single_header/nunit - (See caveats in config/nunit/fakeit_instance.hpp)<fakeit_folder>/single_header/ cute<fakeit_folder>/single_header/ doctest<fakeit_folder>/single_header/standalone - (if you don't use a unit testing framework) If you use FakeIt with NUnit in a managed Visual Studio C++/CLI project, note that it is useful to define your mocks in#pragma unmanaged sections so that you can use lambda expressions.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Easy

Easy

Photo of C++

C++

Photo of FakeIt

FakeIt

Related news:

News photo

SkiftOS: A hobby OS built from scratch using C/C++ for ARM, x86, and RISC-V

News photo

C++: Strongly Happens Before?

News photo

Writing Speed-of-Light Flash Attention for 5090 in CUDA C++