This project is read-only.

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

Sep 12, 2010 at 12:01 AM
Edited Sep 12, 2010 at 3: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 3: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: