lib

morphux C utility library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/lib

commit bd7c7c90461e10c71a7c49640db363096d547013
parent 3c38fb787a0c11adcff424d8afba7d98bce69c7a
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed, 24 May 2017 19:08:09 +0200

Fix(Tests): Add the possibility to force the reset of fails

Diffstat:
Msrc/test.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test.c b/src/test.c @@ -27,7 +27,7 @@ static type (*real_##fn_name)(__VA_ARGS__) = &(fn_name); \ static int g_##fn_name##_fail = -1; \ void set_##fn_name##_fail(int val) { \ - if (g_##fn_name##_fail == -1) \ + if (g_##fn_name##_fail == -1 || val == -1) \ g_##fn_name##_fail = val; \ } \ type fl_##fn_name(__VA_ARGS__) { \