You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
执行报如下错误:
[ RUN ] Nfs4OpGetattrFreeTest.StatusIsNFS4_OK
/home/mockcpp-master/src/ChainableMockObjectBase.cpp:84: Failure
Invocation is expected only once(), but it's been invoked 0 times
method(nfs4_Fattr_Free)
.expects(once())
.invoked(0)
.with();
unknown file: Failure
C++ exception with description "failed due to mockcpp exception" thrown in the test body.
[ FAILED ] Nfs4OpGetattrFreeTest.StatusIsNFS4_OK (0 ms)
需要测试的代码
测试代码
执行报如下错误:
[ RUN ] Nfs4OpGetattrFreeTest.StatusIsNFS4_OK
/home/mockcpp-master/src/ChainableMockObjectBase.cpp:84: Failure
Invocation is expected only once(), but it's been invoked 0 times
method(nfs4_Fattr_Free)
.expects(once())
.invoked(0)
.with();
unknown file: Failure
C++ exception with description "failed due to mockcpp exception" thrown in the test body.
[ FAILED ] Nfs4OpGetattrFreeTest.StatusIsNFS4_OK (0 ms)
分析上述报错的原因是:mock对象nfs4_Fattr_Free没有被调用。测试其他函数,MOCKER打桩的函数也没有生效,而是直接调用了原函数。
请问有没有碰到类似的问题,以及有没有解决办法
The text was updated successfully, but these errors were encountered: