How do I use the VS macros that come with WinUnit?

Sep 11, 2010 at 11:01 PM
Edited Sep 12, 2010 at 2:42 PM

I am trying to use the Visual Studio macros that come with WinUnit.

But when I run (for example) RunTestAtCursor it tells me:

Current function is not a WinUnit test (BEGIN_TEST).

Digging into the macros, I found that it checks whether the function name begins with TEST_.

Unfortunately, the GetCurrentFunctionName function in the VS macro always returns BEGIN_TEST and never the real function name (which will be something like TEST_MyFirstTest). So it won’t run my tests.

I am using Visual Studio 2010.

Sep 12, 2010 at 2:58 PM

I’ve created a modified version of the RunningTests macros that fixes the problem. It’s fairly crude as I’m no VS Macro expert, but if anyone else would like to try it, here it is:

http://gist.github.com/576164