[ntp-GSoC] GSoC Digest, Vol 42, Issue 11

Tomasz Flendrich t.flendrich at gmail.com
Mon Jun 29 01:43:06 UTC 2015

Mark, everybody,

>> 1. Helper functions in Unity
That's a really great idea, something similar to what Damir Tomić came up
with, but you took it to the next level. It looks very useful, but I have
one concern:
Usually software is divided into the interface and the internals. In C, we
can't really force anyone not to use the internals. I am a little bit
afraid of using them, because usually they aren't said to be backward
compatible. NTP is a very long-term project and if a new version of Unity
comes out, we will want to use it. Do you really think it's okay if we use
stuff from unity_internals.h?

We could just convert the line number from integer to string and use it
with regular TEST_ASSERT_XXX_MESSAGE. I would really feel safer doing this,
but maybe there's no point in doing that at all.

>> 2. Which compare function to use?
>(2) When the size isn't a sure thing, going with a larger macro is a really
>good idea. In these cases, going with the TEST_ASSERT_EQUAL_UINT is
>awesome. Another to consider is TEST_ASSERT_EQUAL_HEX because it is easy to
>see where the byte boundaries are when something fails... but this would
>only be possible if you knew it was going to be 32bits or less.

That's a very good idea - I'll use the HEX version whenever the byte
boundaries may be important.
By the way, there's always UNITY_TEST_ASSERT_EQUAL_HEX64, which is more
than 32 bits.

Thank you for your opinions! Of course they are useful! We really value

Tomasz Flendrich

More information about the GSoC mailing list