summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-04-10 11:23:17 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-04-10 11:23:17 +0200
commit14ee9c684e69bb00eaeb0043d06cde7d58effe33 (patch)
tree91f26c671ce3280a2c6c4611d61b00bde332b2c1 /tests
parentf67534a5dab41134e1a117a49f438b8c9a89ae42 (diff)
downloadcmocka-14ee9c684e69bb00eaeb0043d06cde7d58effe33.tar.gz
cmocka-14ee9c684e69bb00eaeb0043d06cde7d58effe33.tar.bz2
cmocka-14ee9c684e69bb00eaeb0043d06cde7d58effe33.zip
tests: Improve the fixture test.
This way we make sure we don't run into an assert if we have more teardown functions than setup functions.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_fixtures.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_fixtures.c b/tests/test_fixtures.c
index 757394a..d7c166a 100644
--- a/tests/test_fixtures.c
+++ b/tests/test_fixtures.c
@@ -30,6 +30,10 @@ static void malloc_teardown_test(void **state)
int main(void) {
const UnitTest tests[] = {
unit_test_setup(malloc_setup_test, setup_only),
+ unit_test_setup(malloc_setup_test, setup_only),
+ unit_test_teardown(malloc_teardown_test, teardown_only),
+ unit_test_teardown(malloc_teardown_test, teardown_only),
+ unit_test_teardown(malloc_teardown_test, teardown_only),
unit_test_teardown(malloc_teardown_test, teardown_only),
};