Link blog: development, C, testing, money

cmocka – unit testing framework for C
Nifty unit test framework which does the checking arguments and providing return values from stub/mocked functions which I tend to spend a bit of time re-creating each time I write a test.
(tags: test development programming testing unit-test C)
What cohabiting couples can to do put their financial house in order | Money | The Guardian
(tags: cohabitation finances will legal law money)

1 Comment on "Link blog: development, C, testing, money"

  1. I learned a new trick from the cmocka header file, which I kind of wish I hadn’t. The function cmocka_run_group_tests(), prominently illustrated in the example on their front page, looks suspiciously as if it’s really a macro (how else would it find out the length of the array you pass to it). But the Doxygen documentation lists it as an honest-to-goodness function – and yet surely the prototype given there cannot possibly work.

    The answer is that the header file is providing the broken function declaration under #ifdef DOXYGEN, and when run for real, the #else clause provides the working macro definition instead. Horrors! I had not previously considered the possibility that someone muight deliberately inject lies into a documentation system whose entire raison d’être is to make sure it can’t help but match the real code.


Leave a Reply

Your email address will not be published.