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

Re: Features for cmocka 1.0


On Monday 20 October 2014 10:43:15 Hendrik Kunert wrote:
> Hi,

Hi,
 
> are there any plans for cmocka 1.0 to run the group setup/teardown for
> every test in the test group. The first time I used group
> setup/teardown I thought thats the way it works, but than I realized
> that it only runs once before/after all tests. I think others will
> also be surprised on this, because the current solution leads to
> dependent unit tests, which is considered as bad practice.

we implemented the it the same way in the new test runner like it is described 
here:

http://check.sourceforge.net/doc/check_html/check_4.html#Test-Fixtures


group_setup()
test[1].setup()
test[1].test()
test[1].teardown()
test[2].setup()
test[2].test()
test[2].teardown()
test[3].setup()
test[3].test()
test[3].teardown()
group_teardown()


This is also the way how I would expect it to work. :)


	-- andreas


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


References:
Re: Features for cmocka 1.0Hendrik Kunert <qkunerd@xxxxxxxxx>