[tests] New adg_test_add_func() common function
commita03c81955ec2292231bb89b544af698ccf3a6065
authorNicola Fontana <ntd@entidi.it>
Tue, 23 Feb 2010 22:43:56 +0000 (23 23:43 +0100)
committerNicola Fontana <ntd@entidi.it>
Tue, 23 Feb 2010 22:43:56 +0000 (23 23:43 +0100)
treea8b3c9c161f4763ddc1ed199504853904a075abd
parent26696b9aa3358b85ccb917166613c48d8c93bf6d
[tests] New adg_test_add_func() common function

Alternative to g_test_add_func() (and compatible with it) that hides the
stderr output if the test function succeed but shows it when the test
fails.

This is done by always performing the test inside a forked environment
without stderr output: if the function fails, the test is rerun without
trapping stderr.
adg/tests/test-internal.c
adg/tests/test-internal.h