CppUTest for embedded C

343 views
Skip to first unread message

Milrren Mattar

unread,
Nov 17, 2015, 6:22:57 AM11/17/15
to cpputest
I would like to use the CppUTest in an embedded C project but, as a beginner on the subject, I wonder if the fact that the library were wrote in C++ and my project in C could possibly cause me any problems or decrease the effectiveness of the tests.
Also, could you send me a step by step install doc? I was a bit confuse following the tutorials there I found on web.

Thanks! (and sorry about my poor english haha)

William Ivory

unread,
Nov 18, 2015, 4:02:16 AM11/18/15
to cppu...@googlegroups.com

Hi Milrren,

 

You can absolutely use CppUTest for C.  I’ve done this on several occasions.  You get the advantage of being able to write OO-style tests, even for non-OO code, and I love the test ‘uato-detection’ – you don’t have to register tests as they get ‘magically’ found.  The only caveat is that you do need to manage the interface between C and C++ carefully – on one project it was trivial, on another I had to create a sort of ‘buffer’ zone / wrapper when calling from C++ to C, but that was likely as much due to my ignorance of how to do it properly as to any more serious problem – and in any case, it worked in the end.

 

As to installation – download, follow the INSTALL file instuctions and it ought to work.  I do recall having a problem moving from 3.5 to 3.6 (or possibly 3.6 to 3.7) with autoconfigure, but found a way around it which was discussed on this alias so should be in the archive.

 

Hope that helps,

 

William

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Milrren Mattar

unread,
Nov 18, 2015, 7:53:13 AM11/18/15
to cpputest
Thanks William!
Reply all
Reply to author
Forward
0 new messages