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

Re: [PATCH v2] cmocka: Allow to pass initial data to test cases


On Monday 14 September 2015 12:52:12 Pawel Szewczyk wrote:
> Sometimes multiple test cases share the same test function, running it
> on different data. To pass this data to test functions we must define
> setup function for each data set. It's not very convienient when there
> are many states to test.
> 
> This commit introduce more elegant way to pass data to tests. The
> initial_state field of CMUnitTest structure can be defined by user.
> It will be either passed to setup function, which makes any preparation
> needed, or it will be passed directly to test function when setup func is
> NULL.

Hi Pawel,

I've pushed your patch. I've reformated the doc for the macros so that they 
fit 80 chars and reworded the @note a bit.

I hope that is fine with you.


Thanks for your contribution, sorry that it took so long.


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

References:
[PATCH v2] cmocka: Allow to pass initial data to test casesPawel Szewczyk <p.szewczyk@xxxxxxxxxxx>