[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: use will_return_* in fixtures


Hello,

I think what you are trying to do is possible.

int setup(void **state){

     will_return(mockedFunction, 10);

}

You will probably want to return 0 from setup if it should be treated as successful. Also, I guess that the mockedFunction should be called from setup, otherwise it will fail due to non-returned values even when the function was called from test function (shouldn't it however be possible?).

Best Regards,
Pawel Szewczyk


Follow-Ups:
AW: AW: use will_return_* in fixturesSimon Röhrl <simon.roehrl@xxxxxxxxxxxx>
References:
use will_return_* in fixturesSimon Röhrl <simon.roehrl@xxxxxxxxxxxx>
Re: use will_return_* in fixturesJoseph.Ates@xxxxxxxxxxxxx
AW: use will_return_* in fixturesSimon Röhrl <simon.roehrl@xxxxxxxxxxxx>