Since those two functions are hidden, you have no ways to test them, other then calling the func
function.
That means, you can not mock the calls to ´call´ and ´print´ functions.
The only way would be to somehow unhide those two functions, or at least change the way you call them.
If you create function callback variables in your header, and call them instead of the real functions, then you can mock those calls. Something like this (not tested) :
file.h
typedef void call();
namespace hidden{
extern call callCb;
}
int func(int);
file.cpp
namespace{
void call(){
//do stuff
}
}
namespace hidden{
call callCb=::call;
}
int func(int){
hidden::callCb();
// do things
}