the source code is:
bool checkGlobalEnable(void* vpIn)
{
mux_switch_conf_t* pMux = (mux_switch_conf_t*)vpIn;
return (MUX_ENABLE == pMux->arg) ? true : false;
}
MOCKER(msMux_IoCtrl)
.expects(once())
.with(eq(IOCTRL_CLASS_MSAN_SWITCH_INTF), eq(DRV_SET_DHCP_EN), checkWith(checkGlobalEnable), any(), any())
.will(returnValue(0));
then compiled in vs2005 failed:
using native typeof
1>c:\syy\mockcpp\include\mockcpp\chainingmockhelper.h(103) : error C2825:
'Predict': must be a class or namespace when followed by '::'
1>
e:\testngpp\myprj\nppkt\nppkt\unittest\testcase\test_nppkt_pktctrl.h(53) : see
reference to function template instantiation 'mockcpp::Constraint
*mockcpp::checkWith<int(__cdecl *)(void *)>(Predict)' being compiled
1> with
1> [
1> Predict=int (__cdecl *)(void *)
1> ]
1>c:\syy\mockcpp\include\mockcpp\chainingmockhelper.h(103) : error C2039: '()'
: is not a member of '`global namespace''
1>c:\syy\mockcpp\include\mockcpp\chainingmockhelper.h(103) : error C2275:
'Predict' : illegal use of this type as an expression
1>
e:\testngpp\myprj\nppkt\nppkt\unittest\testcase\test_nppkt_pktctrl.h(53) : see
declaration of 'Predict'
1>c:\syy\mockcpp\include\mockcpp\chainingmockhelper.h(103) : error C2275:
'Predict' : illegal use of this type as an expression
Original issue reported on code.google.com by call...@gmail.com on 12 Oct 2012 at 4:12
Original issue reported on code.google.com by
call...@gmail.com
on 12 Oct 2012 at 4:12