ez8-co / emock

🐞 下一代C/C++跨平台mock库 (Next generation cross-platform mock library for C/C++)
Apache License 2.0
118 stars 35 forks source link

how to use .after(const InvocationMockerNamespace& ns, const std::string& name) #6

Open kiddy818 opened 4 years ago

kiddy818 commented 4 years ago

if I have a mock like this: EMOCK(&CLASS_NAME_A::FUNCTION_NAME_A).expects(once()).id("1");

how can i ref to it from another EMOCK? EMOCK(&CLASS_NAME_B::FUNCTION_NAME_B).expects(once()).after(???, "1").will(ignoreReturnValue());

what should i fill for ???

orca-zhang commented 4 years ago

try to use:

EMOCK(&CLASS_NAME_B::FUNCTION_NAME_B)
    .expects(once())
    .after("1")
    .will(ignoreReturnValue());