catchorg / Catch2

A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
https://discord.gg/4CWS9zD
Boost Software License 1.0
18.71k stars 3.06k forks source link

Add mocking support #1659

Closed Viatorus closed 5 years ago

Viatorus commented 5 years ago

Description If you want to mock an interface in C++, there are two well known frameworks, which are:

I have the strong opinion, that we can create a better API than GMock (by supporting only newer CPP standards) but overcome the limitation of FakeIt.

Additional context I would love to support this feature with planning and PRs.

Guys, should we give it a try?

Viatorus commented 5 years ago

There is https://github.com/rollbear/trompeloeil.

I think it is a good alternative to all.

timweissenfels commented 5 years ago

So no further development in this?

matepek commented 4 years ago

This is might interesting for someone: https://github.com/matepek/catch2-with-gmock

sinojelly commented 3 years ago

Maybe someone is interested in this : https://github.com/sinojelly/catch2-with-mockcpp

More information can be found here : https://github.com/sinojelly/mockcpp