Thursday, November 29, 2012

Using google test with MFC applications

The problem

In order to test an MFC application with the google test framework you need a customized main function. The main function provided by the google test framework itself does not suffice as it doesn't initialize MFC properly and your application fails to start.

The solution

To solve this problem, google test allows us to create our own main function. Here's one that works-for-me. Please let me know of you come up with something more elegant.

2 comments: