How to test void function?

728 views
Skip to first unread message

Sugantha Lakshmi

unread,
Nov 9, 2009, 4:58:24 AM11/9/09
to Cmockery
Hi,

I am using Cmockery framework for unit testing. I need to test void
function.
Can any one please tell me how to test void function using Cmockery
framework?

Thanks in advance.

Regards,
Suganthi

Alexander Demin

unread,
Nov 9, 2009, 5:45:42 AM11/9/09
to cmoc...@googlegroups.com
Suganthi,

It depends what your function does. You call it in your test and use assert_* macros against variables it has changed.

Alexander

Sugantha Lakshmi

unread,
Nov 10, 2009, 12:46:28 AM11/10/09
to Cmockery
Thank you Alexander.
I ll try this.

Suganthi

On Nov 9, 3:45 pm, Alexander Demin <ade...@gmail.com> wrote:
> Suganthi,
>
> It depends what your function does. You call it in your test and use
> assert_* macros against variables it has changed.
>
> Alexander
>
> On Mon, Nov 9, 2009 at 9:58 AM, Sugantha Lakshmi
> <suganthalaks...@gmail.com>wrote:
>
>
>
>
>
> > Hi,
>
> > I am using Cmockery framework for unit testing. I need to test void
> > function.
> > Can any one please tell me how to test void function using Cmockery
> > framework?
>
> > Thanks in advance.
>
> > Regards,
> > Suganthi- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages