[Unit-tests] Fix test framework leaking on successful checks under setup or teardown mode. Failed checks in these modes are noted and then freed, but not when passed.

This commit is contained in:
Andrey Volk 2019-11-24 03:59:54 +04:00
parent ff65104c03
commit 5836b9652b
1 changed files with 4 additions and 1 deletions

View File

@ -3663,9 +3663,12 @@ with. If we fail a setup up, then we go directly to a teardown mode. */
fct_ts__add_test( \
fctkern_ptr__->ns.ts_curr, fctkern_ptr__->ns.curr_test \
); \
} else { \
fct_test__del(fctkern_ptr__->ns.curr_test); \
fctkern_ptr__->ns.curr_test = NULL; \
} \
} else { \
switch_assert("invalid condition for fct_req!"); \
switch_assert("invalid condition for fct_req!"); \
_fct_req((_CNDTN_)); \
}