Whatever you want it to. For example:
void *var = malloc(100);
memset(var, 0, 100)
UT_ASSERT_M("Malloc work!\n", testallzero(var), {
free(var);
});
// do something else with var now...
On Wed, Nov 25, 2015 at 1:38 PM, Barret Rhoden <[email protected]> wrote:
> Hi -
>
> In this:
>
> #define UT_ASSERT_M(message, test, ...)
> \
> do {
> \
> if (!(test)) {
> \
> char fmt[] = "Assertion failure in %s() at %s:%d: %s";
> \
> sprintf(utest_msg, fmt, __FUNCTION__, __FILE__, __LINE__,
> message); \
> __VA_ARGS__;
> \
> return false;
> \
> }
> \
> } while (0)
>
> What's __VA_ARGS__ supposed to do? I saw it and thought that we could
> pass a fmt string for message and use the ... for the values for that
> string, but it just prints the messages as is (without processing it).
>
> Barret
>
> --
> You received this message because you are subscribed to the Google Groups
> "Akaros" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
~Kevin
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.