I am working on a project based upon MFC, building in Visual studio 2010. I was hoping to ease some of the testing by creating a automate a few (unit) tests of some worker objects (non GUI classes).
Visual Studio 2010 got MS test, and this would be my preferred choice, due to the IDE integration.
However i my attempts failed quite quickly. 1) Add MS-test project 2) Include the source files for testing 3) Change CLR support from Safe -> pure (avoid errors)
The build fails when first interface is meet (my classes override this) Note: The classes build fine in my MFC project.
#include "stdafx.h"
#pragma once
class ihttp_Common
{
public:
virtual bool IsExecuting() = 0;
virtual CEvent& ExecutionEnded() = 0;
//several other methods
};
I get the error:
*1>c:\srcPath\SomeInterface.h(9): error C2143: syntax error : missing ';' before '&'*
- Am i defining my interfaces badly ?
- Is MS-Test really incompatible with virtual methods