Friday, 22 July 2011

Mocking C++

This month’s ACCU London was at 7City to hear Ed Sykes tell us about a couple of C++ mocking frameworks, MockIt Now and HippoMock. Ed is a very relaxed, confident speaker and the code and demonstrations he used were simple, straight forward and easy to understand. I mostly came a long to meet Ed as he’s an excellent contributor to the ACCU and specifically the Mentored Developers projects.

Ed obviously hit a chord with the audience and there was plenty of interaction and question asking. There were even a few tangents that Ed handled brilliantly. It looks like both of these frameworks use quite a bit of compiler magic and function pointer repointing, along with macro magic to achieve in C++, what is easily achieved with reflection in the likes of Java and C#.

Following the short presentation there was a long discussion on the more general topic of mock objects. Even though I haven’t used C++ for a little while, this presentation was absolutely fascinating and I will definitely be using a mock framework on my next C++ project.

No comments:

Post a Comment