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

Re: Features for cmocka 1.0


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 20.10.2014 um 11:34 schrieb Andreas Schneider:
> On Monday 20 October 2014 10:43:15 Hendrik Kunert wrote:
> 
> 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
>
>
But
> 
Check gives checked and unchecked fixtures. Especially the checked
fixtures are what I'm looking for. I created a minimal example to
clarify what I mean.

https://gist.github.com/kunerd/60131f54598e841162ee

I could use the one liner:

	tcase_add_checked_fixture(tc_core, setup, teardown);

to add setup and teardown functions for multiple test cases. Is there
or will there be a similar function in CMocka?

At the moment the only way I know is to use:

	unit_test_setup(test1, setup)
	unit_test_setup(test2, setup)

Cheers,
Hendrik

> 
> 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
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJURpXMAAoJEOD5OmvL5UzfmYwIAI2FfBtbl6p+u4HYXX4vuahs
QV4bTpVNkv2zcLEa9n1QNbvbjMU1LVAKonVzSvVR7tdTPtuZ3d1ByX6jWE2JrRxS
aXvyQnlqihMJ06qnjJbC+7ybSCnPPb38h+ftsWFP07bf2NgvwZkJa8Ho/iELSG7W
omdgTp8DWTspUCYDF9H7182+A6Pm7kBx32Vutz5m4qVSVwhHkeYo6IW/6AqL06+c
CCWKoe/KJDEXmPTRRdmdl08fiBlpbfkdfOYXFBJruy4SgMDOcayFb6Ua1a9ohr5i
O9log+jxkCMbqmqhUnqFgQaYGTVR6rMzG6TyqNR9AeVGOc6VrllLQukPqwQ4OMM=
=D7BJ
-----END PGP SIGNATURE-----