What layout frameworks work with cppunit?

I am implementing the unit test infrastructure for a large C++ project, and for political reasons I'm pretty sure CppUnit will be pushed as a single testing module.

I am trying to define layout frameworks that blend with CppUnit . I found mockpp and I heard that Google Mock should work.

What frameworks work together with CppUnit ?

+4
source share
1 answer

Mocking libraries are usually independent of unit testing systems. They perform two different jobs and, frankly, do not make much sense to talk to each other. Where they integrate, you have to answer these questions:

  • When should I create my mock objects?
  • When should I initialize the layout of objects with my expectations?
  • When should I verify that mocks is being called as expected?

And you do it at the appropriate points in your tests.

For example, check opmock. http://sourceforge.net/projects/opmock/

According to their wiki, opmock is easily called from the CppUnit test. See http://sourceforge.net/p/opmock/wiki/Using%20Opmock%20with%20other%20unit%20testing%20frameworks/

+3
source

Source: https://habr.com/ru/post/1443465/


All Articles