Hi William
You could use some conditional logic in the mock stub function like
this:value;
if (tag == ITS_A_STRING)
mock_c()->actualCall("my_cli_arg_create")
->withIntParameters("tag", tag)
->withStringParameters("pval", pval)
->returnValue().value.pointerValue;
else if (tag == ITS_A_POINTER)
mock_c()->actualCall("my_cli_arg_create")
->withIntParameters("tag", tag)
->withPointerParameters("pval", pval)
->returnValue().value.pointerValue;
else if (tag == ITS_AN_INT)
mock_c()->actualCall("my_cli_arg_create")
->withIntParameters("tag", tag)
->withIntParameters("pval", pval)
->returnValue().value.pointerValue;
I'm not sure i this will work, but it might.
James
--------------------------------------------------------------------------------------------
James Grenning Author of TDD for Embedded C
www.wingman-sw.com http://pragprog.com/titles/jgade/
www.wingman-sw.com/blog
www.twitter.com/jwgrenning
> --
> You received this message because you are subscribed to the Google
> Groups "cpputest" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
cpputest+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.