Failed assertions should leave the test in a FAILED state and should not allow the execution to continue.
Required changes:
The test function should receive an assertion_runner_fn instead of an assertion_container. This will not only help in the above mentioned problem, but also eliminate the limitation created by MAX_ASSERTIONS_PER_TEST definition.
The assertion_runner_fn should be defined as follows:
typedef int (*assertion_runner_fn)(struct assertion *);
This function should return 0 when the assertion successes and 1 when the assertion fails (similar to Unix syscalls).
Failed assertions should leave the test in a FAILED state and should not allow the execution to continue.
Required changes:
The test function should receive an
assertion_runner_fn
instead of anassertion_container
. This will not only help in the above mentioned problem, but also eliminate the limitation created byMAX_ASSERTIONS_PER_TEST
definition.The
assertion_runner_fn
should be defined as follows:This function should return
0
when the assertion successes and1
when the assertion fails (similar to Unix syscalls).