Menu

About

Alexey V. Vasilyev

About

CxxMock is simplest framework for creating mock-objects for C++. The main idea is simple: do not need write anything more if we can generate it.

As Rhyno.mock uses reflection for generation proxy/stub object based on specified interface, CxxMock uses compile-time utility cxxmockgen for generating mock object.

Using restrictions

Mock object generation is not magic. And I not planned to create C++ parser. Mock generattion tool have next restrictions:

Class must be declarest such next:

class Interface
{
public:
        virtual Type* pointerReturnMethod(type value, type* ptr, type& refValue) = 0; 
        virtual Type valueReturnMetod() = 0; 
        virtual void voidMethod() = 0; 
};
  1. Method signature must be declare on one line.
  2. Reference and pointer attribute must be placed near to Type.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.