Mockingbird c++ mocking framework
You make the code really hard to read:
#define INJECTION_SET(FuncName, Substitute)\
private:\
template&lt;class T&gt;\
class FuncName##Class {\
public:\
FuncName##Class():m_func((T)Substitute){}\
T m_func;\
};\
FuncName##Class&lt;decltype(Substitute)&gt; m_##FuncName##Class;\
mutable int m_##FuncName##CallCounter = 0;\
public:\
void Inject##FuncName(decltype(Substitute) sub){\
m_##FuncName##Class.m_func = sub;}\
int Get##FuncName##CallCounter(){return m_##FuncName##CallCounter;}

just because it is a  macro does not mean it needs to be unreadable. You can still format it nicely for the maintainer.
#define INJECTION_SET(FuncName, Substitute)                         \
                                                                    \
    private:                                                        \
    template&lt;class T&gt;                                               \
    class FuncName##Class                                           \
    {                                                               \
        public:                                                     \
            FuncName##Class():m_func((T)Substitute){}               \
            T m_func;                                               \
    };                                                              \
                                                                    \
    FuncName##Class&lt;decltype(Substitute)&gt; m_##FuncName##Class;      \
                                                                    \
    mutable int m_##FuncName##CallCounter = 0;                      \
    public:                                                         \
    void Inject##FuncName(decltype(Substitute) sub)                 \
    {                                                               \
        m_##FuncName##Class.m_func = sub;                           \
    }                                                               \
    int Get##FuncName##CallCounter()                                \
    {                                                               \
        return m_##FuncName##CallCounter;                           \
    }